[SERVER-16500] Reduce contention on ReplicationCoordinatorImpl::_mutex Created: 10/Dec/14  Updated: 03/Mar/15  Resolved: 22/Dec/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.8.0-rc2
Fix Version/s: 2.8.0-rc3

Type: Bug Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-16333 hot replication mutex Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

The mutex is a significant source of contention, even with replication disabled.



 Comments   
Comment by Githook User [ 10/Dec/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-16500 Change the meaning of getReplicationMode() to be constant after start up.

Previously, ReplicationCoordinator::getReplicationMode() returned modeNone if
the settings object indicated the node was part of a replica set, but no valid
replica set configuration had yet been discovered. With this change, the
settings object is the sole determinant of the return value of
getReplicationMode(). Callers that wish to know if a replica set member is
initialized should instead check ReplicationCoordinator::getMemberState(). If
the value is RS_STARTUP, then the node is not initialized with a replica set
config.

This has the side-effect of removing the mutex in ReplCoordinatorImpl from the
code path for this method.
Branch: master
https://github.com/mongodb/mongo/commit/98a7e7f9709413ce06f49b48dee98f7080505947

Generated at Thu Feb 08 03:41:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.