[SERVER-47361] Add test that TopologyStateMachine checks electionId before updating TopologyDescription Created: 06/Apr/20 Updated: 29/Oct/23 Resolved: 10/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc1, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Janna Golden | Assignee: | Janna Golden |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v4.4
|
||||
| Sprint: | Sharding 2020-04-20 | ||||
| Participants: | |||||
| Description |
|
The topology state machine checks the setVersion and electionId fields before installing a new server description. This ticket is to add a test to confirm that when a stale primary reports that it is the primary, the TopologyStateManager marks this node as unknown. The TopologyStateManager uses the setVersion and electionId to determine whether a node is stale. |
| Comments |
| Comment by Githook User [ 10/Apr/20 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: (cherry picked from commit 2729fa173989a90ee8f9b114d1695aea062a43ae) |
| Comment by Githook User [ 08/Apr/20 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: |
| Comment by Janna Golden [ 08/Apr/20 ] |
|
We split this ticket out into two pieces, lamont.nelson's comment above is more relevant to the newer related ticket |
| Comment by Lamont Nelson [ 06/Apr/20 ] |
|
I think the config server check is required since multiple nodes are updating this state. So we should probably change the onConfirmed set event to include the term so that we can know which primary generated the data, and we only take action onConfirmedSet if the term is higher than what we have previously seen (similar to how votes are granted in the paxos protocol). |