summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornehakhatri5 <neha.khatri@mongodb.com>2017-10-17 16:08:03 +1100
committernehakhatri5 <neha.khatri@mongodb.com>2017-10-20 00:48:53 +1100
commit1c96c3561dda50fc3ba6d98decef1c0d3c9f60df (patch)
tree23a03aa175fd8843619ef3a08d36386fd3adffe0
parentfc252a557434e988f63ea2dc54c06b7a508ef34f (diff)
downloadmongo-1c96c3561dda50fc3ba6d98decef1c0d3c9f60df.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.
-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 bb0b643cc43..5778754e815 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_mongod.cpp
@@ -132,9 +132,9 @@ bool 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;
}