summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornehakhatri5 <neha.khatri@mongodb.com>2017-10-17 16:08:03 +1100
committernehakhatri5 <neha.khatri@mongodb.com>2018-05-02 11:04:42 +1000
commitff63eee6bfba4d0cd4c1eaf1a95e5ada19f26afa (patch)
treec23065404177bc5e3222a4be57d1c77a5b3cb0f3
parent1f6ce7dea097c2b3daad2829dd6c4d11a94ad679 (diff)
downloadmongo-ff63eee6bfba4d0cd4c1eaf1a95e5ada19f26afa.tar.gz
SERVER-23935 Disable oplog sampling in queryable backup mode
In queryable backup mode the oplog truncation would never occur. Hence oplog sampling is disabled this mode. (cherry picked from commit 1c96c3561dda50fc3ba6d98decef1c0d3c9f60df)
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
index 4d2bb460585..c879eff94c6 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
@@ -136,9 +136,9 @@ bool WiredTigerKVEngine::initRsOplogBackgroundThread(StringData ns) {
return false;
}
- if (storageGlobalParams.repair) {
+ if (storageGlobalParams.repair || storageGlobalParams.readOnly) {
LOG(1) << "not starting WiredTigerRecordStoreThread for " << ns
- << " because we are in repair";
+ << " because we are either in repair or read-only mode";
return false;
}