-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Storage
-
Fully Compatible
-
ALL
-
Repl 2018-03-26
-
0
At startup, the `WiredTigerOplogManager::_oplogReadTimestamp` is typically initialized to `1`. Currently, oplog readers getting a visibility timestamp are completely asynchronous with how that value is updated; an oplog reader that gets in quickly after startup can attempt to read with timestamp 1 and crash the server.
Instead, it should be legal to initialize the value with `_oplogMaxAtStartup`. That value may contain holes, but holes imply replication recovery will truncate the oplog before accepting connections. A call to `cappedTruncateAfter` will set the correct the value.