[SERVER-77399] Remove preallocateSnapshotForOplogRead() Created: 23/May/23  Updated: 29/Oct/23  Resolved: 06/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Daniel Gomez Ferro Assignee: Daniel Gomez Ferro
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-77507 Integrate acquisitions into Find Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-06-12, Execution EMEA Team 2023-06-26, Execution EMEA Team 2023-07-10
Participants:

 Description   

Currently we need to preallocate a snapshot differently if we are reading from the oplog or not.

When we call preallocateSnapshotForOplogRead() we set the _isOplogReader flag in the WiredTigerRecoveryUnit, which is used when opening a snapshot and then when getting the oplog visibility TS (which is called from here, only when reading from the oplog).

We should remove this logic and always assume we could be reading from the oplog. For that we'd just need to always set _oplogVisibleTs (when ReadSource is kNoTimestamp), that cost would be an atomic word read.



 Comments   
Comment by Githook User [ 05/Jul/23 ]

Author:

{'name': 'Daniel Gómez Ferro', 'email': 'daniel.gomezferro@mongodb.com', 'username': 'dgomezferro'}

Message: SERVER-77399 Remove preallocateSnapshotForOplogRead()
Branch: master
https://github.com/mongodb/mongo/commit/41233098125139736e37a8a0dc3d174b7a28a803

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