From c389e7f69f637f7a1ac3cc9fae843b635f20b766 Mon Sep 17 00:00:00 2001 From: Eric Milkie Date: Fri, 24 May 2019 14:45:31 -0400 Subject: SERVER-41291 ensure advancing of oldest timestamp in enableMajorityReadConcern=false mode on secondary nodes --- src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp index cb4b67e5934..6e9b1c0232f 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp @@ -227,7 +227,14 @@ void WiredTigerOplogManager::_oplogJournalThreadLoop(WiredTigerSessionCache* ses // where we commit data file changes separately from oplog changes, so ignore // a non-incrementing timestamp. if (newTimestamp <= _oplogReadTimestamp.load()) { - LOG(2) << "no new oplog entries were made visible: " << newTimestamp; + // Even if we didn't need to move the oplogReadTimestamp forward, we still need to take + // care of moving the oldest timestamp. WiredTigerRecordStore::oplogDiskLocRegister() + // may have moved the oplogReadTimestamp forward without also moving the oldest + // timestamp. + if (updateOldestTimestamp) { + const bool force = false; + sessionCache->getKVEngine()->setOldestTimestamp(Timestamp(newTimestamp), force); + } continue; } -- cgit v1.2.1