[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: |
|
||||||||||||||||||||||||
| 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: |
| Comment by Githook User [ 17/Nov/14 ] |
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: |
| 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. |