diff options
author | Robert Guo <robertguo@me.com> | 2016-07-11 18:21:56 -0400 |
---|---|---|
committer | Robert Guo <robertguo@me.com> | 2016-07-14 15:59:36 -0400 |
commit | 9730e49b06fc9902bf80207c889b919b157b8f35 (patch) | |
tree | b4e9e8848849f15c6e6df7bfe0e52e46286931aa /src | |
parent | 132de7f6e3270321fbbd072c06b05691cbb8baa8 (diff) | |
download | mongo-9730e49b06fc9902bf80207c889b919b157b8f35.tar.gz |
SERVER-24726 readonly mode should ignore temp collections
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/db.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 56dff7cecaf..7008f1f0c5a 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -453,7 +453,8 @@ static void repairDatabasesAndCheckVersion(OperationContext* txn) { handleSERVER23299ForDb(txn, db); } - if (shouldClearNonLocalTmpCollections || dbName == "local") { + if (!storageGlobalParams.readOnly && + (shouldClearNonLocalTmpCollections || dbName == "local")) { db->clearTmpCollections(txn); } } |