diff options
author | Kevin Matulef <matulef@gmail.com> | 2012-09-02 20:39:50 -0400 |
---|---|---|
committer | Dan Pasette <dan@10gen.com> | 2012-09-27 17:48:18 -0400 |
commit | f87923d19fc3d5b65d4c1743b758dd6bc03b783d (patch) | |
tree | a72e59fd357cfa38c8c6312228f18674b7123215 /src | |
parent | 10b45bf1f0ed50242f4aa3dbaa7ab150d3d9bfe6 (diff) | |
download | mongo-f87923d19fc3d5b65d4c1743b758dd6bc03b783d.tar.gz |
SERVER-6911 don't run TTL monitor if not in a readable state
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/ttl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp index e2c145b9db2..76aa3165de3 100644 --- a/src/mongo/db/ttl.cpp +++ b/src/mongo/db/ttl.cpp @@ -38,7 +38,7 @@ namespace mongo { static string secondsExpireField; void doTTLForDB( const string& dbName ) { - + Client::GodScope god; vector<BSONObj> indexes; @@ -117,6 +117,10 @@ namespace mongo { continue; } + // if part of replSet but not in a readable state (e.g. during initial sync), skip. + if ( theReplSet && !theReplSet->state().readable() ) + continue; + set<string> dbs; { Lock::DBRead lk( "local" ); |