-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
setConfig() is only called from ReplicationCoordinatorImpl::_setCurrentRSConfig, when the replication coordinator mutex is already held.
However it looks like we should always be holding the replication coordinator mutex when making changes to the config - this can be enforced by having setConfig() take a WithLock argument the same way getConfig(WithLock) does.
It would also be nice if we can add more information to getConfig(WithLock) describing when it is to be called versus the lock-free version. (From a quick reading of the code, we seem to use it whenever we want to make sure that the config cannot change underneath us - and the only way to use getConfig(WithLock) is to grab the replication coordinator first, which ensures that setConfig() cannot be called.)
- is related to
-
SERVER-96144 Possible race condition when reading replica set config fields outside of replication
- Backlog
-
SERVER-89631 Make reading `ReplSetConfig` mostly lock-free
- Closed