[SERVER-24466] replsettest getPrimary() should only return when there is exactly one node in the primary state Created: 08/Jun/16  Updated: 07/Dec/16  Resolved: 09/Jun/16

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

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Judah Schvimer
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
Backport Completed:
Sprint: Repl 16 (06/24/16)
Participants:
Linked BF Score: 0

 Description   

Currently if two nodes think that they are Primary, whichever getPrimary() calls isMaster on last will be returned. calls to getPrimary() are often followed by writes to the primary which will fail if that primary steps down soon after being returned.



 Comments   
Comment by Githook User [ 09/Jun/16 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-24466 ReplSetTest getPrimary() now only returns when there is one primary

(cherry picked from commit 2559d31fe46d0cbabe19b7084cadd438f3e13d33)
Branch: v3.2
https://github.com/mongodb/mongo/commit/516d1d68896b6cc227d427d27140c2a23f7123b4

Comment by Githook User [ 09/Jun/16 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-24466 ReplSetTest getPrimary() now only returns when there is one primary
Branch: master
https://github.com/mongodb/mongo/commit/2559d31fe46d0cbabe19b7084cadd438f3e13d33

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