diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-14 11:57:35 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-16 11:43:28 -0500 |
commit | 8467708af7fa83f8827362b80f56dab4aad30a41 (patch) | |
tree | ab7858f01ec8ced3111c583ec33e1a55f89d27fe /src/mongo/db/s/sharding_state.cpp | |
parent | 6cbca62471218a08a4fdf8785bd1e1e38cf9bde3 (diff) | |
download | mongo-8467708af7fa83f8827362b80f56dab4aad30a41.tar.gz |
SERVER-29909 Remove circular dependency between db_raii and sharding libraries
Diffstat (limited to 'src/mongo/db/s/sharding_state.cpp')
-rw-r--r-- | src/mongo/db/s/sharding_state.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/mongo/db/s/sharding_state.cpp b/src/mongo/db/s/sharding_state.cpp index 16a0627e48b..d4025ea9e11 100644 --- a/src/mongo/db/s/sharding_state.cpp +++ b/src/mongo/db/s/sharding_state.cpp @@ -37,15 +37,14 @@ #include "mongo/client/connection_string.h" #include "mongo/client/replica_set_monitor.h" #include "mongo/db/auth/authorization_session.h" +#include "mongo/db/catalog/catalog_raii.h" #include "mongo/db/client.h" -#include "mongo/db/db_raii.h" #include "mongo/db/dbhelpers.h" #include "mongo/db/operation_context.h" #include "mongo/db/ops/update.h" #include "mongo/db/ops/update_lifecycle_impl.h" #include "mongo/db/repl/optime.h" -#include "mongo/db/repl/replication_coordinator_global.h" -#include "mongo/db/s/collection_metadata.h" +#include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/s/operation_sharding_state.h" #include "mongo/db/s/sharded_connection_info.h" @@ -67,11 +66,6 @@ #include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" -#include <chrono> -#include <ctime> -#include <iomanip> -#include <iostream> - namespace mongo { using std::shared_ptr; @@ -100,7 +94,7 @@ void updateShardIdentityConfigStringCB(const string& setName, const string& newC } Client::initThread("updateShardIdentityConfigConnString"); - auto uniqOpCtx = getGlobalServiceContext()->makeOperationContext(&cc()); + auto uniqOpCtx = Client::getCurrent()->makeOperationContext(); auto status = ShardingState::get(uniqOpCtx.get()) ->updateShardIdentityConfigString(uniqOpCtx.get(), newConnectionString); |