[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:
Backports
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: SERVER-47361 Add test that TopologyStateMachine checks electionId before updating TopologyDescription

(cherry picked from commit 2729fa173989a90ee8f9b114d1695aea062a43ae)
Branch: v4.4
https://github.com/mongodb/mongo/commit/c01d93166f824ecc0aeb57d3f02003d833769fa5

Comment by Githook User [ 08/Apr/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-47361 Add test that TopologyStateMachine checks electionId before updating TopologyDescription
Branch: master
https://github.com/mongodb/mongo/commit/14a5bcab6ee67dad278c02d74fea2bf4df149aa2

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 SERVER-47366.

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).

Generated at Thu Feb 08 05:13:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.