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

Update setVersion number on primary and secondary changes

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.10, 2.6.0
    • Component/s: Replication
    • Labels:
      None

      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.

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

              Created:
              Updated:
              Resolved: