diff options
author | Eric Milkie <milkie@10gen.com> | 2019-05-24 14:45:31 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2019-05-24 15:49:41 -0400 |
commit | c389e7f69f637f7a1ac3cc9fae843b635f20b766 (patch) | |
tree | c6a1082a3aab24ca98ba24363e4070fc45f0dd58 /src | |
parent | 445872c8ab7e073b67b87a56180c685b24d81d49 (diff) | |
download | mongo-c389e7f69f637f7a1ac3cc9fae843b635f20b766.tar.gz |
SERVER-41291 ensure advancing of oldest timestamp in enableMajorityReadConcern=false mode on secondary nodesr4.0.10-rc1r4.0.10
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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; } |