-
Type: Spec Change
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: SDAM
-
None
-
Needed
SPEC-863 describes a case where a restarted primary from a 3-node replica set was selected for a write operation. This selection was based on outdated topology information, as the restart and application write occurred during a heartbeat interface. Since the restarted node had no previous connections, a new connection was made and a subsequent isMaster command was issued. In that response, the node identified itself as a secondary and a separate node as the new primary.
This isMaster response resulted in libmongoc logging "Transitioning to RSWithPrimary for RSSecondary". I believe this transition currently jibes with the TopologyType Table in the spec, since the topology's state was ReplicaSetWithPrimary at this point; however, the isMaster response from this restarted node (previously a primary and now a secondary) conflicts with the existing topology as reported from the other two nodes in the last heartbeat. In this case, it may not make sense to trust this node as an authority on the topology state until the real primary can affirm the same in a subsequent isMaster.
- links to