-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.0, v3.6
-
Repl 2018-08-13
-
63
It is not valid to read collections while holding the replication mutex. The reason is that reading a collection takes the global lock, which may be held by another thread, and that thread may be waiting on the replication mutex (e.g. by calling getMyLastAppliedOpTime).
Thus, _replicationProcess->getConsistencyMarkers->getMinValid must not be called with the replication mutex held, as it is in _finishLoadLocalConfig.
I believe we may simply release the repl mutex before checking !lastOpTime.isNull()
Then re-acquire after calling getMinValid() (and remove the else clause).
- is related to
-
SERVER-36407 Use AutoCollection instead of AutoCollectionForRead
- Closed