[SERVER-48257] Reject heartbeat reconfig when running for election Created: 15/May/20  Updated: 29/Oct/23  Resolved: 19/May/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.4.0-rc7, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Fixed Votes: 0
Labels: safe-reconfig-related
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-48256 Election cannot be canceled when writ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Repl 2020-06-01
Participants:
Linked BF Score: 23

 Description   

Currently, receiving a reconfig when the node is in candidate state will try to cancel the election, but due to SERVER-48256, the cancelation may not work as expected.

As a quick fix, we can reject heartbeat reconfig instead of canceling the election. The election will finish no matter what so liveness isn't affected. In reality, the node with a higher config <term, version> will vote no to the election as well.



 Comments   
Comment by Githook User [ 18/May/20 ]

Author:

{'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com', 'username': 'visualzhou'}

Message: SERVER-48257 Reject reconfig via heartbeat during election.

(cherry picked from commit e8c93d3278965d731522bf9bf05525267d3e8fb8)
Branch: v4.4
https://github.com/mongodb/mongo/commit/c25273c122812261b6fe87d78b2ce7c229a2c80b

Comment by Githook User [ 18/May/20 ]

Author:

{'name': 'Siyuan Zhou', 'email': 'visualzhou@gmail.com', 'username': 'visualzhou'}

Message: SERVER-48257 Backport handleHeartbeatResponse_forTest to 4.4

The test helper is introduced in SERVER-46381 and updated by SERVER-48115.
Branch: v4.4
https://github.com/mongodb/mongo/commit/f5f77b5f38efa5c7254593d89e43ac23cd4fac0f

Comment by Githook User [ 18/May/20 ]

Author:

{'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com', 'username': 'visualzhou'}

Message: SERVER-48257 Reject reconfig via heartbeat during election.
Branch: master
https://github.com/mongodb/mongo/commit/e8c93d3278965d731522bf9bf05525267d3e8fb8

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