Skip to content

Commit 3020767

Browse files
committed
SERVER-32606 Oplog read time may only decrease during rollback
1 parent 086cec1 commit 3020767

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ void WiredTigerOplogManager::_oplogJournalThreadLoop(WiredTigerSessionCache* ses
177177

178178
const uint64_t newTimestamp = _fetchAllCommittedValue(sessionCache->conn());
179179

180-
if (newTimestamp == _oplogReadTimestamp.load()) {
180+
// The newTimestamp may actually go backward during secondary batch application,
181+
// where we commit data file changes separately from oplog changes, so ignore
182+
// a non-incrementing timestamp.
183+
if (newTimestamp <= _oplogReadTimestamp.load()) {
181184
LOG(2) << "no new oplog entries were made visible: " << newTimestamp;
182185
continue;
183186
}

0 commit comments

Comments
 (0)