[SERVER-13542] Expose electionId on primary in isMaster Created: 10/Apr/14  Updated: 27/Oct/15  Resolved: 17/Nov/14

Status: Closed
Project: Core Server
Component/s: Replication, Write Ops
Affects Version/s: None
Fix Version/s: 2.6.10, 2.8.0-rc1

Type: Improvement Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: Matt Dannenberg
Resolution: Done Votes: 9
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-4407 Document that isMaster now includes e... Closed
Related
is related to SERVER-13909 Update Command Spec to include setVer... Closed
is related to SERVER-14899 Re-evaluate the behavior of connectio... Closed
Backwards Compatibility: Minor Change
Backport Completed:
Participants:

 Description   

By exposing the electionId so clients (drivers really) will be able to detect when an election has occurred and a new primary should be discovered. Currently this is just exposed for sharding clients, but we can expose it all the time and in isMaster which clients poll periodically.



 Comments   
Comment by Githook User [ 04/May/15 ]

Author:

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

Message: SERVER-13542 Expose electionId on primary in isMaster
Branch: v2.6
https://github.com/mongodb/mongo/commit/bab08433794c50bd96b2fb8558075a14a5a075b2

Comment by Githook User [ 17/Nov/14 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-13542: include electionId in isMaster when primary
Branch: master
https://github.com/mongodb/mongo/commit/764b53c3432c0b01f8d44fe3cea1a5f6d07d805b

Comment by A. Jesse Jiryu Davis [ 07/Nov/14 ]

Adding "driver changes needed," we should take advantage of this field to more quickly detect elections from the driver side.

Comment by Christian Amor Kvalheim [ 10/Apr/14 ]

this is to avoid flip-flopping potentially caused by mismatched ismaster results from different hosts right after election (on system under load) causing the drivers to revert to the old primary.

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