-
Type: Improvement
-
Resolution: Done
-
Priority: 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.