[SERVER-43574] validate cmd must open oplog cursors first to obey oplog visibility rules Created: 23/Sep/19  Updated: 29/Oct/23  Resolved: 24/Sep/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2019-10-07
Participants:
Linked BF Score: 0

 Description   

Need to move this code to open index cursors to after the collection cursors are opened, so that the collection cursors are the first to open the WT txn and set isOplogReader.

We expect an oplog cursor to be requested prior to opening a WT txn so that we can enforce oplog visibility rules: if a read is done against another collection first, we do not trigger the read timestamp restrictions involved in reading from the oplog collection. Additionally, only oplog collection reads trigger the visibility reqs: oplog index cursors do not.
This is also causing non-deterministically failures in validate_oplig_in_background.js because we do not force a checkpoint in the JS test, so it often benignly doesn't find the collection in the checkpoint and exits early; as opposed to finding the collection and hitting the invariant upon attempting access of the data.



 Comments   
Comment by Githook User [ 24/Sep/19 ]

Author:

{'name': 'Dianna Hohensee', 'username': 'DiannaHohensee', 'email': 'dianna.hohensee@mongodb.com'}

Message: SERVER-43574 validate cmd must open oplog collection cursors before accessing any other collection in the same WT txn
Branch: master
https://github.com/mongodb/mongo/commit/ccbc2473f57504f9ce08096efd000fb37a9e90fc

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