diff options
author | Blake Oler <blake.oler@mongodb.com> | 2018-04-02 15:45:58 -0400 |
---|---|---|
committer | Blake Oler <blake.oler@mongodb.com> | 2018-05-10 15:08:44 -0400 |
commit | ec4a3883899f3ea9f4600b786596f0b17fd00106 (patch) | |
tree | 55ad39cbfd920747bd907a61438f19c12235f553 /src/mongo/db/s/config/configsvr_enable_sharding_command.cpp | |
parent | b3bc4954c8f9044b92ccfbb4e872f87c69e39016 (diff) | |
download | mongo-ec4a3883899f3ea9f4600b786596f0b17fd00106.tar.gz |
SERVER-32375 Use readConcern local for config metadata operations
Diffstat (limited to 'src/mongo/db/s/config/configsvr_enable_sharding_command.cpp')
-rw-r--r-- | src/mongo/db/s/config/configsvr_enable_sharding_command.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp b/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp index 5401fd64a1e..198f108cc1d 100644 --- a/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp +++ b/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp @@ -39,6 +39,7 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/operation_context.h" +#include "mongo/db/repl/read_concern_args.h" #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/catalog/type_database.h" #include "mongo/s/catalog_cache.h" @@ -103,6 +104,10 @@ public: "_configsvrEnableSharding can only be run on config servers"); } + // Set the operation context read concern level to local for reads into the config database. + repl::ReadConcernArgs::get(opCtx) = + repl::ReadConcernArgs(repl::ReadConcernLevel::kLocalReadConcern); + const std::string dbname = parseNs("", cmdObj); uassert( |