[SERVER-35000] A RecoveryUnit::ReadSource of "no timestamp" should be distinguishable from the default of kNone Created: 15/May/18  Updated: 29/Oct/23  Resolved: 13/Jun/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.0.0-rc6, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-36006 `multiInitialSyncApply` should consid... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Storage NYC 2018-06-18
Participants:

 Description   

The default ReadSource on a RecoveryUnit is kNone, which implies reads occur without a timestamp. In some cases, specifically for readers like FTDC which read without a timestamp, it is unknowable whether the ReadSource was left unset or set explicitly to kNone.

This would be useful in AutoGetCollectionForRead, where we check if ShouldNotConflictWithSecondaryBatchApplicationBlock is set. If it is, we implicitly assume the reader was willing to read without a timestamp, but this block can also get set when acquiring multiple different collection locks in the same scope. We should depend on information in the RecoveryUnit, not the Locker for whether or not to read with a timestamp.

This work can be either

  • add a default enumeration state that is distinguishable from kNone
  • make the field a boost::optional

Both options should read without a timestamp in WiredTigerRecoveryUnit.



 Comments   
Comment by Githook User [ 13/Jun/18 ]

Author:

{'username': 'xy24', 'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-35000 Distinguish readSource noTimestamp from readSource unset

(cherry picked from commit 33660f28022d5d765a39c650b32fca8165be2d02)
Branch: v4.0
https://github.com/mongodb/mongo/commit/6e13aec0f42bc9774496401e921db76a19527092

Comment by Githook User [ 12/Jun/18 ]

Author:

{'username': 'xy24', 'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com'}

Message: SERVER-35000 Distinguish readSource noTimestamp from readSource unset
Branch: master
https://github.com/mongodb/mongo/commit/33660f28022d5d765a39c650b32fca8165be2d02

Generated at Thu Feb 08 04:38:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.