Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-859

Use setVersion field in isMaster for replica set discovery

      The latest 2.5 nightly has support for a setVersion field in the isMaster response. It looks like an integer value that is incremented after every replset reconfig.

      The driver could use this field during replica set discovery process in the following way:

      1. keep track of the highest value for setVersion seen so far
      2. if an isMaster response has a higher setVersion that that, prefer its lists of hosts/passives/arbiters to those seen from any previous isMaster response
      3. if it has a lower setVersion, ignore the various hosts lists
      4. if the setVersion is equal, it should be the same list of hosts so nothing needs to be done
      5. if there is no setVersion, assume it's newer

      Note that the setVersion is not incremented after an election, only after a reconfig.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: