[SERVER-22444] invariant in updateConfig() when running an election Created: 02/Feb/16  Updated: 07/Sep/17  Resolved: 11/Feb/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.3.2

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Done Votes: 0
Labels: bkp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4, v3.2
Sprint: Repl 10 (02/19/16)
Participants:
Linked BF Score: 115

 Description   

TopologyCoordinatorImpl::updateConfig() assumes the node cannot be a candidate by checking an invariant, but it does happen after the node starts an new election. We need to investigate the circumstances that resulted in the failure.

    invariant(_role != Role::candidate);



 Comments   
Comment by Githook User [ 11/Feb/16 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-22444 cancel outstanding elections prior to accept new config
Branch: master
https://github.com/mongodb/mongo/commit/6e9fd902d5cb25aef992363efa128640affd5196

Comment by Matt Dannenberg [ 09/Feb/16 ]

The candidate role is used to indicate that the node is conducting an election. A node should not conduct an election during a reconfig, since it may not be electable in the new config. It sounds like we are not properly cancelling outstanding elections before accepting a new config on at least one code path.

Generated at Thu Feb 08 04:00:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.