summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2018-09-17 13:35:41 -0400
committerHenrik Edin <henrik.edin@mongodb.com>2018-09-20 10:58:42 -0400
commitc69ec130f14953056461cf40ddf368d8ecf7185b (patch)
tree70fc2276ec7619c498c833fc8546fc3fd21ba558 /src/mongo/s
parentd5c17e385f543f0afdc4acd5331cc5514549981f (diff)
downloadmongo-c69ec130f14953056461cf40ddf368d8ecf7185b.tar.gz
SERVER-36084 Remove sharding runtime dependency from OpObserverImpl
Implement a new subclass of OpObserverImpl to handle the sharding logic. Can hopefully be a pure subclass of just OpObserver when OpTimes can be passed into observers.
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/SConscript3
-rw-r--r--src/mongo/s/sharding_mongod_test_fixture.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
index 1dbc4f3d9a0..c1bb1baa369 100644
--- a/src/mongo/s/SConscript
+++ b/src/mongo/s/SConscript
@@ -203,9 +203,10 @@ env.Library(
'sharding_mongod_test_fixture.cpp',
],
LIBDEPS=[
- '$BUILD_DIR/mongo/db/op_observer_d',
'$BUILD_DIR/mongo/db/repl/drop_pending_collection_reaper',
'$BUILD_DIR/mongo/db/repl/replmocks',
+ '$BUILD_DIR/mongo/db/s/op_observer_sharding_impl',
+ '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
'$BUILD_DIR/mongo/db/service_context_d_test_fixture',
'sharding_test_fixture_common',
],
diff --git a/src/mongo/s/sharding_mongod_test_fixture.cpp b/src/mongo/s/sharding_mongod_test_fixture.cpp
index a91670bf753..ee47ab1ab1c 100644
--- a/src/mongo/s/sharding_mongod_test_fixture.cpp
+++ b/src/mongo/s/sharding_mongod_test_fixture.cpp
@@ -42,7 +42,6 @@
#include "mongo/db/client.h"
#include "mongo/db/commands.h"
#include "mongo/db/namespace_string.h"
-#include "mongo/db/op_observer_impl.h"
#include "mongo/db/op_observer_registry.h"
#include "mongo/db/query/cursor_response.h"
#include "mongo/db/query/query_request.h"
@@ -55,6 +54,7 @@
#include "mongo/db/repl/replication_recovery_mock.h"
#include "mongo/db/repl/storage_interface_mock.h"
#include "mongo/db/s/config_server_op_observer.h"
+#include "mongo/db/s/op_observer_sharding_impl.h"
#include "mongo/db/s/shard_server_op_observer.h"
#include "mongo/executor/network_interface_mock.h"
#include "mongo/executor/task_executor_pool.h"
@@ -136,7 +136,7 @@ void ShardingMongodTestFixture::setUp() {
repl::StorageInterface::set(service, std::move(storagePtr));
auto opObserver = checked_cast<OpObserverRegistry*>(service->getOpObserver());
- opObserver->addObserver(stdx::make_unique<OpObserverImpl>());
+ opObserver->addObserver(stdx::make_unique<OpObserverShardingImpl>());
opObserver->addObserver(stdx::make_unique<ConfigServerOpObserver>());
opObserver->addObserver(stdx::make_unique<ShardServerOpObserver>());