diff options
Diffstat (limited to 'src/mongo/db/prefetch.cpp')
-rw-r--r-- | src/mongo/db/prefetch.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/prefetch.cpp b/src/mongo/db/prefetch.cpp index 615721b5e31..a55993037bc 100644 --- a/src/mongo/db/prefetch.cpp +++ b/src/mongo/db/prefetch.cpp @@ -43,7 +43,6 @@ #include "mongo/db/repl/oplog_entry.h" #include "mongo/db/repl/repl_settings.h" #include "mongo/db/repl/replication_coordinator.h" -#include "mongo/db/repl/replication_coordinator_global.h" #include "mongo/db/server_parameters.h" #include "mongo/db/stats/timer_stats.h" #include "mongo/db/storage/mmap_v1/mmap.h" @@ -216,12 +215,12 @@ public: virtual ~ReplIndexPrefetch() {} const char* _value() { - if (getGlobalReplicationCoordinator()->getReplicationMode() != + if (ReplicationCoordinator::get(getGlobalServiceContext())->getReplicationMode() != ReplicationCoordinator::modeReplSet) { return "uninitialized"; } ReplSettings::IndexPrefetchConfig ip = - getGlobalReplicationCoordinator()->getIndexPrefetchConfig(); + ReplicationCoordinator::get(getGlobalServiceContext())->getIndexPrefetchConfig(); switch (ip) { case ReplSettings::IndexPrefetchConfig::PREFETCH_NONE: return "none"; @@ -239,7 +238,7 @@ public: } virtual Status set(const BSONElement& newValueElement) { - if (getGlobalReplicationCoordinator()->getReplicationMode() != + if (ReplicationCoordinator::get(getGlobalServiceContext())->getReplicationMode() != ReplicationCoordinator::modeReplSet) { return Status(ErrorCodes::BadValue, "replication is not enabled"); } @@ -264,7 +263,8 @@ public: str::stream() << "unrecognized indexPrefetch setting: " << prefetch); } - getGlobalReplicationCoordinator()->setIndexPrefetchConfig(prefetchConfig); + ReplicationCoordinator::get(getGlobalServiceContext()) + ->setIndexPrefetchConfig(prefetchConfig); return Status::OK(); } |