[SERVER-41250] Reset the oldest timestamp if initial sync fails and starts another attempt Created: 20/May/19 Updated: 29/Oct/23 Resolved: 21/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0-rc3, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samyukta Lanka | Assignee: | Samyukta Lanka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | isfz, prepare_initial_sync | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v4.2
|
||||
| Steps To Reproduce: | I have attached the test that the initial sync fuzzer generated to repro this. |
||||
| Sprint: | STM 2019-06-03, Repl 2019-06-17, Repl 2019-07-01 | ||||
| Participants: | |||||
| Description |
|
When starting initial sync, we reset the node's lastAppliedOptime. However, we do not reset the oldest timestamp. This can be a problem if we fail an initial sync attempt, because when we try to write to the oplog, we can trigger this WT assertion that the commit timestamp of a storage transaction should not be before the oldest timestamp. Since the oldest timestamp was not reset after the attempt failed and the first oplog entry to apply during initial sync is a prepare oplog entry, the timestamp to write the oplog entry is incorrectly before the oldest timestamp. |
| Comments |
| Comment by Githook User [ 26/Jun/19 ] |
|
Author: {'name': 'Samy Lanka', 'email': 'samy.lanka@mongodb.com', 'username': 'lankas'}Message: (cherry picked from commit ee746fb1672655b1cf6a1efff2b3f48ed8551e20) |
| Comment by Githook User [ 21/Jun/19 ] |
|
Author: {'name': 'Samy Lanka', 'username': 'lankas', 'email': 'samy.lanka@mongodb.com'}Message: |
| Comment by Judah Schvimer [ 21/May/19 ] |
|
This should be as easy as calling this StorageEngine::setOldestTimestamp() function. |