[SERVER-81591] Ensure that the secondary being stepped up in stopReplicationAndEnforceNewPrimaryToCatchUp is not stale Created: 29/Sep/23 Updated: 16/Nov/23 Resolved: 23/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0, 7.0.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Vishnu Kaushik | Assignee: | Vishnu Kaushik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v7.1, v7.0, v6.0, v5.0
|
||||||||||||||||
| Sprint: | Repl 2023-10-16, Repl 2023-10-30 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 5 | ||||||||||||||||
| Description |
|
In the function stopReplicationAndEnforceNewPrimaryToCatchUp() still has the problem listed in We need to make sure that the secondaries are actually caught up (which may be impossible, since the primary's PrimaryOnlyService may write at any point meaning the secondaries won't be caught up), or we need to make the "candidate secondary", the secondary that is passed in to the function to be made the new primary, ahead of the other secondary so that it wins the election. One way I can think of performing the latter idea is to stop replication on the other secondaries and not on the candidate secondary. We can then perform a write on the primary and make sure that it has reached the candidate secondary. This will ensure that the candidate secondary is more up-to-date than any other secondary, and then it can win the election. |
| Comments |
| Comment by Githook User [ 10/Nov/23 ] |
|
Author: {'name': 'kauboy26', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'}Message: |
| Comment by Githook User [ 10/Nov/23 ] |
|
Author: {'name': 'kauboy26', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'}Message: |
| Comment by Githook User [ 20/Oct/23 ] |
|
Author: {'name': 'kauboy26', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'}Message: |