Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48674

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

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

      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@mongodb.com Cheahuychou Mao
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: