Primary -> Standalone transition in TopologyStateMachine differs from SDAM spec

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      The TopologyStateMachineTestFixture::ShouldNotRemoveNonPrimaryServerWhenTopologyIsReplicaSetWithPrimaryAndMeIsNotPresent unit test tests that when a primary transitions to a Standalone, it has an Unknown server type and remains in the ReplicaSetNoPrimary topology.

      The primary_becomes_standalone spec tests expects that the Standalone is removed from the ReplicaSetNoPrimary cluster topology and is assigned a Standalone server type.

      If we delete this special casing logic for standalones here, we pass the spec test. If we leave it in, we pass the unit test.

      This special casing actually causes 5 spec tests to break, all for the same reason that they turn Standalones into Unknowns:

      • single/standalone_removed.json
      • rs/primary_becomes_standalone.json
      • rs/member_standalone.json
      • rs/non_rs_member.json
      • rs/replicaset_rsnp.json
      • rs/repeated.json

      We should investigate if there was an initial motivation for deviating from the spec, and consider modifying our impl to be spec-compliant if not.

            Assignee:
            Unassigned
            Reporter:
            Erin McNulty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: