-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
Repl 2020-06-29
Currently we advance our oldest timestamp to lastApplied whenever we are in STARTUP2 state. This was originally intended to relieve cache pressure during initial sync oplog application, as described in SERVER-32226. The current logic, however, is not strictly scoped to initial sync oplog application, since we pass through STARTUP2 whenever we start up and go through recovery on our way to SECONDARY. This means that, after a normal startup recovery procedure, we will set our lastApplied and oldest timestamp to the top of the oplog when we load our optimes from disk here. This can lead to a case where we become SECONDARY and our oldest timestamp is ahead of our initialDataTimestamp before we have set a stable timestamp. Due to the changes inĀ SERVER-47844, this can cause an issue where we try to set our first stable timestamp behind the oldest timestamp, since we use the initialDataTimestamp as a barrier behind which we will not set the stable timestamp. To avoid this problem, we should move this logic into the setMyLastOpTime callback which is the specific location where we advance lastApplied during initial sync oplog application.
- is depended on by
-
SERVER-47844 Update _setStableTimestampForStorage to set the stable timestamp without using the stable optime candidates set when EMRC=true
- Closed
- related to
-
SERVER-32226 oldest_timestamp should track the last applied time, during initial sync
- Closed