Check if replication is enabled before checking if the node is an arbiter in LogicalSessionCacheImpl

XMLWordPrintableJSON

    • Fully Compatible
    • v4.4, v4.2, v4.0
    • Sharding 2020-06-15
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-40441 made arbiters not try to create session collection or check if it exists. To check if a node is an arbiter, the LogicalSessionCacheImpl calls ReplicationCoordinator::getMemberState. In the case of standalones, this function returns RS_PRIMARY in 4.6 and 4.4 but throws UASSERT_NOT_IMPLEMENTED in 4.2 and earlier. To avoid the error and be consistent, we should call ReplicationCoordinator::isReplEnabled before calling ReplicationCoordinator::getMemberState() in all versions. 

              Assignee:
              Cheahuychou Mao
              Reporter:
              Cheahuychou Mao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: