summaryrefslogtreecommitdiff
path: root/src/mongo/db/ttl.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-06-30 15:48:52 -0400
committerBenety Goh <benety@mongodb.com>2017-07-05 15:18:05 -0400
commit3c9d91f8e408339ba2ecfdf1c34cb93b4ed6a926 (patch)
tree924e854eee13f41de73e39ccd4efdd13065399f8 /src/mongo/db/ttl.cpp
parent1235bd664bbe9e6364f079abb693fe1be6e8a1eb (diff)
downloadmongo-3c9d91f8e408339ba2ecfdf1c34cb93b4ed6a926.tar.gz
SERVER-29685 do not process ttl indexes on drop-pending collections
Diffstat (limited to 'src/mongo/db/ttl.cpp')
-rw-r--r--src/mongo/db/ttl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp
index 59599f109c7..61c61ddbcb5 100644
--- a/src/mongo/db/ttl.cpp
+++ b/src/mongo/db/ttl.cpp
@@ -170,6 +170,9 @@ private:
*/
void doTTLForIndex(OperationContext* opCtx, BSONObj idx) {
const NamespaceString collectionNSS(idx["ns"].String());
+ if (collectionNSS.isDropPendingNamespace()) {
+ return;
+ }
if (!userAllowedWriteNS(collectionNSS).isOK()) {
error() << "namespace '" << collectionNSS
<< "' doesn't allow deletes, skipping ttl job for: " << idx;