Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2054

SDAM updates topology from new connection handshake of secondary that was previously a primary

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: SDAM
    • Labels:
      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: