[SERVER-76548] AutoGetCollectionForReadLockFree::_originalReadSource is unused Created: 26/Apr/23  Updated: 04/May/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Daniel Gomez Ferro Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

In AutoGetCollectionForReadLockFree we can change the RecoveryUnit's read source if we are on a secondary, so we are storing the original read source presumably in order to restore it when the AutoGetCollectionForReadLockFree is destroyed, however it's not used again after initialization.

I think previous versions of the Lock free auto getters didn't restore it either, so this might be fine, it's just a bit deceiving.



 Comments   
Comment by Daniel Gomez Ferro [ 26/Apr/23 ]

SnapshotHelper::changeReadSourceIfNeeded already has some logic to reset the read source after yields if necessary.

Generated at Thu Feb 08 06:32:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.