summaryrefslogtreecommitdiff
path: root/src/mongo/db/ttl.cpp
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2014-06-03 17:46:49 -0400
committerSpencer T Brody <spencer@mongodb.com>2014-06-06 11:13:18 -0400
commit3be5d76cc11ee3e8412299b6f6d42c5f655bed06 (patch)
tree893c9ed81e15f033f8098c57e3e5bbbf5993dc02 /src/mongo/db/ttl.cpp
parenta156d9a1bd205367c5b4dd8d12e6246090fafbbd (diff)
downloadmongo-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.cpp5
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;