[SERVER-62379] Fix deadlock between ReplicationCoordinator and BackgroundSync on stepUp Created: 05/Jan/22 Updated: 29/Oct/23 Resolved: 12/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0, 5.0.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Moustafa Maher | Assignee: | Moustafa Maher |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v5.2, v5.1, v5.0, v4.4, v4.2
|
||||||||||||||||
| Sprint: | Replication 2022-01-24 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 123 | ||||||||||||||||
| Description |
|
Bug:
Proposed fix: We need to move _replCoord->getMyLastAppliedOpTime() before we acquire the mutex. |
| Comments |
| Comment by Githook User [ 19/Feb/22 ] |
|
Author: {'name': 'Moustafa Maher Khalil', 'email': 'm.maher@mongodb.com', 'username': 'moustafamaher'}Message: |
| Comment by Moustafa Maher [ 02/Feb/22 ] |
|
Backport justification: The bug is not too rare not to do it, it seems like it could happen when a node is stepping up and starting a new oplog fetcher at the same time. |
| Comment by Moustafa Maher [ 21/Jan/22 ] |
|
This needs to batched to all versions containing |
| Comment by Githook User [ 11/Jan/22 ] |
|
Author: {'name': 'Moustafa Maher Khalil', 'email': 'm.maher@mongodb.com', 'username': 'moustafamaher'}Message: |