[SERVER-9034] Return rs config version from isMaster Created: 20/Mar/13 Updated: 10/Nov/15 Resolved: 11/Jun/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Matt Dannenberg |
| Resolution: | Done | Votes: | 0 |
| Labels: | ismaster | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
This will allow clients to detect replica set changes if they are interested. Will be used by mongos to update shard seeds entries in config db. |
| Comments |
| Comment by Eric Milkie [ 12/Jun/13 ] |
|
That's right, if the config changes the composition of the members, then definitely prefer a higher config version. |
| Comment by Jeffrey Yemin [ 12/Jun/13 ] |
|
Let's say a driver makes concurrent calls to isMaster on all currently known members. The first one comes back with a list of hosts [a, b, c] and setVersion : 3. The next one comes back with a list of hosts [a, c, d] and setVersion : 2. In this case the driver can discard the results of the second call because it's staler than the previous isMaster result. |
| Comment by Eric Milkie [ 12/Jun/13 ] |
|
What's a replica set state – do you mean a member state such as SECONDARY or PRIMARY? That won't be in isMaster. |
| Comment by Scott Hernandez (Inactive) [ 12/Jun/13 ] |
|
Or just to detect when changes to the config have occurred, which is what mongos will use it for. |
| Comment by Jeffrey Yemin [ 12/Jun/13 ] |
|
Could drivers use this to decide on a winner in the case where different replica set members are reporting different replica set states from isMaster? |
| Comment by Eric Milkie [ 08/Jun/13 ] |
|
The new ismaster.js test does not run with auth: |
| Comment by Matt Dannenberg [ 07/Jun/13 ] |
|
In the docs, mention that the config version is included in the isMaster() response. |
| Comment by auto [ 07/Jun/13 ] |
|
Author: {u'username': u'dannenberg', u'name': u'Matt Dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: also bulked out the replset/ismaster1.js jstest |