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().