diff options
author | Spencer T Brody <spencer@mongodb.com> | 2014-06-03 17:46:49 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2014-06-06 11:13:18 -0400 |
commit | 3be5d76cc11ee3e8412299b6f6d42c5f655bed06 (patch) | |
tree | 893c9ed81e15f033f8098c57e3e5bbbf5993dc02 /src/mongo/db/ttl.cpp | |
parent | a156d9a1bd205367c5b4dd8d12e6246090fafbbd (diff) | |
download | mongo-3be5d76cc11ee3e8412299b6f6d42c5f655bed06.tar.gz |
SERVER-14135 Use ReplicationCoordinator to determine if replication is enabled
Diffstat (limited to 'src/mongo/db/ttl.cpp')
-rw-r--r-- | src/mongo/db/ttl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp index cb861e48ec5..ba360ddfcea 100644 --- a/src/mongo/db/ttl.cpp +++ b/src/mongo/db/ttl.cpp @@ -42,6 +42,7 @@ #include "mongo/db/instance.h" #include "mongo/db/ops/delete.h" #include "mongo/db/repl/is_master.h" +#include "mongo/db/repl/repl_coordinator_global.h" #include "mongo/db/server_parameters.h" #include "mongo/db/operation_context_impl.h" #include "mongo/util/background.h" @@ -167,7 +168,9 @@ namespace mongo { } // if part of replSet but not in a readable state (e.g. during initial sync), skip. - if (repl::theReplSet && !repl::theReplSet->state().readable()) + if (repl::getGlobalReplicationCoordinator()->getReplicationMode() == + repl::ReplicationCoordinator::modeReplSet && + !repl::theReplSet->state().readable()) continue; set<string> dbs; |