[SERVER-20812] Relinquishing primary makes vote request from higher-priority node fail Created: 07/Oct/15  Updated: 25/Jan/17  Resolved: 14/Oct/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.2.0-rc0

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: RPL A (10/09/15), Repl B (10/30/15)
Participants:
Linked BF Score: 0

 Description   

If only 2 nodes in a replset are alive, for example, one node in a 3-node replset has been down, when the node with a higher priority starts to run election, the other node which is the current primary will detect the higher term, step down and close all connections immediately before voting for the higher-priority node, which leads to an election failure.

We'll tag the connection used by vote request and close other connections when relinquishing primary.



 Comments   
Comment by Githook User [ 14/Oct/15 ]

Author:

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

Message: SERVER-20812 Synchronize stepdown when processing vote request.
Branch: master
https://github.com/mongodb/mongo/commit/a8242b99c2455d2c95ae529d8717b268d1fbf024

Comment by Siyuan Zhou [ 14/Oct/15 ]

Stepdown is not synchronized with connection tag, which leads to a race between closing connections and sending response.

Comment by Githook User [ 14/Oct/15 ]

Author:

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

Message: SERVER-20812 Tag vote request connection to skip closing it when relinquishing primary
Branch: master
https://github.com/mongodb/mongo/commit/bededc2f0496162a188d66835638a2dc714b8b98

Generated at Thu Feb 08 03:55:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.