diff options
author | Spencer T Brody <spencer@mongodb.com> | 2020-08-11 16:04:42 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-19 15:15:06 +0000 |
commit | b8576f13bfcade43dfa411bcce9cc8b554b8d9ce (patch) | |
tree | 45c34470269d47b1e622986f595459baedb34b02 /src/mongo/db/mongod_main.cpp | |
parent | 486b46c9078eade75d79c6cf95c1475413df8a83 (diff) | |
download | mongo-b8576f13bfcade43dfa411bcce9cc8b554b8d9ce.tar.gz |
SERVER-50053 Remove PrimaryOnlyService instances from registry when their state documents are deleted.
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index 22cdf3d00e5..d49f70d4440 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -111,6 +111,7 @@ #include "mongo/db/read_write_concern_defaults_cache_lookup_mongod.h" #include "mongo/db/repl/drop_pending_collection_reaper.h" #include "mongo/db/repl/oplog.h" +#include "mongo/db/repl/primary_only_service_op_observer.h" #include "mongo/db/repl/repl_settings.h" #include "mongo/db/repl/replica_set_aware_service.h" #include "mongo/db/repl/replication_consistency_markers_impl.h" @@ -981,6 +982,8 @@ void setUpObservers(ServiceContext* serviceContext) { opObserverRegistry->addObserver(std::make_unique<OpObserverImpl>()); } opObserverRegistry->addObserver(std::make_unique<AuthOpObserver>()); + opObserverRegistry->addObserver( + std::make_unique<repl::PrimaryOnlyServiceOpObserver>(serviceContext)); setupFreeMonitoringOpObserver(opObserverRegistry.get()); |