[SERVER-57099] Preserve donor oplog optime in o2 when avoid re-wrapping previously migrated retryable writes noop Created: 20/May/21 Updated: 29/Oct/23 Resolved: 25/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc1, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lingzhi Deng | Assignee: | Lingzhi Deng |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | post-rc0 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||
| Sprint: | Repl 2021-05-31 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
We had logic to avoid re-wrapping previously migrated retryable writes noop in new noops. For example, if the previously migrated retryable writes noop the recipient fetches from the donor looks like {op: 'n', o2: <original_retryable_write_entry with ts 50>, ts: 100, ...}, the new noop the recipient writes would look like {op: 'n', o2: <original_retryable_write_entry with ts 50>, ts: xxx, ...} (where xxx is the timestamp at which the recipient writes the new noop). After failovers, the recipient uses the ts in the o2 field of the last noop to determine where to resume applying/batching donor oplog entries. Using the example above, if the recipient has processed a donor oplog at ts: 100, we should resume applying/batching from ts: 100. But because this doesn't preserve the processed donor optime in o2, the recipient would mistakenly resume from ts: 50 after failovers, which could result in processing the same retryable write twice or having two entries of the same statement in the oplog chain. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 26/May/21 ] |
|
Author: {'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}Message: (cherry picked from commit 3637dce904cc334f7e72dcf23516f18c7b815eda) |
| Comment by Githook User [ 25/May/21 ] |
|
Author: {'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}Message: |