diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2017-08-15 10:56:11 -0400 |
---|---|---|
committer | Gabriel Russell <gabriel.russell@mongodb.com> | 2017-09-21 15:41:06 -0400 |
commit | 305f4366320ba2538f077c28d0f3ea6979277c48 (patch) | |
tree | 683be295499125aa86147bab7f1e018111ba5b7f /src/mongo/db/commands/refresh_logical_session_cache_now.cpp | |
parent | 8beb002326a5fdd82c694497b7ebcb52a593a3d3 (diff) | |
download | mongo-305f4366320ba2538f077c28d0f3ea6979277c48.tar.gz |
SERVER-30430 Gate session use on featureCompatibilityVersion
Diffstat (limited to 'src/mongo/db/commands/refresh_logical_session_cache_now.cpp')
-rw-r--r-- | src/mongo/db/commands/refresh_logical_session_cache_now.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/db/commands/refresh_logical_session_cache_now.cpp b/src/mongo/db/commands/refresh_logical_session_cache_now.cpp index f1b61473cda..cb607f13b82 100644 --- a/src/mongo/db/commands/refresh_logical_session_cache_now.cpp +++ b/src/mongo/db/commands/refresh_logical_session_cache_now.cpp @@ -32,6 +32,7 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/logical_session_cache.h" +#include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" namespace mongo { @@ -64,6 +65,12 @@ public: Status checkAuthForOperation(OperationContext* opCtx, const std::string& dbname, const BSONObj& cmdObj) override { + + if (serverGlobalParams.featureCompatibility.version.load() == + ServerGlobalParams::FeatureCompatibility::Version::k34) { + return SessionsCommandFCV34Status(getName()); + } + return Status::OK(); } @@ -71,6 +78,12 @@ public: const std::string& db, const BSONObj& cmdObj, BSONObjBuilder& result) override { + + if (serverGlobalParams.featureCompatibility.version.load() == + ServerGlobalParams::FeatureCompatibility::Version::k34) { + return appendCommandStatus(result, SessionsCommandFCV34Status(getName())); + } + auto cache = LogicalSessionCache::get(opCtx); auto client = opCtx->getClient(); |