-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication, Testing Infrastructure
-
None
-
Fully Compatible
-
ALL
-
v4.0
-
Repl 2019-02-11
-
16
The waitForSecondaries function in the background dbhash check waits for theĀ lastCommittedOpTime on the secondary to reach the clusterTime when enableMajorityReadConcern=false. However, the lastCommittedOpTime is the secondary's knowledge of the majority commit point and may be behind its last applied. For the atClusterTime wait for readConcern to succeed on master, the secondary's lastApplied must be at least clusterTime, so we should check replSetGetStatus.optimes.appliedOpTime. For the atClusterTime wait for readConcern to succeed on 4.0, the secondary's current committed snapshot must be at least clusterTime, so we should check replSetGetStatus.optimes.readConcernMajorityOpTime. Note that readConcernMajorityOpTime may be ahead of appliedOpTime on master.