Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13539

Update setVersion number on primary and secondary changes

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.10, 2.6.0
    • Replication
    • None

    Description

      Currently setVersion only gets updated when adding or removing servers from the set. It should update when the state of servers change aswell in the state particularly when a new primary is elected.

      Currently if your are querying a replicaset it's impossible to properly detect if a new primary got elected as server 1 might respond with the new primary but server 2 shows the old. The driver cannot reason which one is correct potentially causing flip-flops.

      Increasing the setVersion on these changes would make it super easy to reason about the correct state as it would be possible to know which "topology" is the newest.

      Attachments

        Activity

          People

            Unassigned Unassigned
            christkv Christian Amor Kvalheim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: