-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.0.0, 4.2.0, 4.4.0, 5.0.0, 5.1.0
-
Component/s: Internal Client
-
None
-
Fully Compatible
-
ALL
-
Execution Team 2021-11-29
-
152
RSLocalClient::queryOnce(kMajorityReadConcern) will modify the ReadSource for the RecoveryUnit to be kMajorityCommitted. It won't restore the original ReadSource upon returning from the function. This issue was discovered during SERVER-59831 because it caused a later write using the same OperationContext to still be using kMajorityCommitted as its ReadSource and for the later write not to see the effects of an earlier write from secondary batch application.
if (readConcernLevel == repl::ReadConcernLevel::kMajorityReadConcern) {
// Set up operation context with majority read snapshot so correct optime can be retrieved.
opCtx->recoveryUnit()->setTimestampReadSource(RecoveryUnit::ReadSource::kMajorityCommitted);
...
}
My thought here would be to introduce a new RAII type to enable the ReadSource to be temporarily overridden and to use it in RSLocalClient::queryOnce().
- is related to
-
SERVER-59831 WTUniqueIndex::_insert expects secondaries to pass in dupsAllowed=true
- Closed
-
SERVER-61459 ShardingCatalogManager::assignKeyRangeToZone() reads stale version of CollectionType while running locally on config server primary
- Closed
-
SERVER-57566 Implement sharding admin commands behaviour for time series collection
- Closed
-
SERVER-61704 Investigate the usage of abandonSnapshot() in ReadSourceScope
- Closed