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

Avoid taking ReplicationCoordinator mutex when deciding to gossip cluster times with external clients

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.1.0-rc0
    • None
    • Fully Compatible
    • v5.0, v4.4, v4.2, v4.0
    • Sharding 2021-07-12, Sharding 2021-07-26, Sharding 2021-08-09, Sharding 2021-08-23
    • 135

    Description

      To decide whether to gossip cluster times to and from external clients, mongod will check if it is in a readable state (as of SERVER-47568). Validating incoming cluster times requires having cached signing keys from admin.system.keys so this is meant to avoid persistent validation errors when a node enters an unreadable state.

      Currently, this check happens twice for each received external request and uses the ReplicationCoordinator method getMemberState(). This method takes the ReplicationCoordinator mutex, which is often contested and can have a performance impact on certain workloads. Instead, a method that does not take this mutex should be used, like ReplicationCoordinator::isInPrimaryOrSecondaryState().

      Attachments

        Issue Links

          Activity

            People

              randolph@mongodb.com Randolph Tan
              jack.mulrow@mongodb.com Jack Mulrow
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: