[SERVER-37550] Relax rules on setting readOnce flag on WiredTiger session Created: 10/Oct/18  Updated: 29/Oct/23  Resolved: 11/Oct/18

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

Type: Improvement Priority: Major - P3
Reporter: Matthew Russotto Assignee: Matthew Russotto
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-36068 Expose a user-accessible cursor optio... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2018-10-22
Participants:

 Description   

A WiredTiger transaction may be started before mongod 'find' or 'getMore' command execution begins, through readConcern or multi-statement transaction execution. If the readOnce flag is not permitted to be set with a storage transaction active, this will result in an invariant if we attempt to set readOnce in the 'find' or 'getMore' execution path. Additionally, the fact that a transaction is active is not directly exposed to the upper layers (i.e. RecoveryUnit has no inActiveTxn()), so this is difficult to reliably prevent.

Since this restriction is not required by WiredTiger itself, we can relax the API to allow the readOnce flag to be set if and only if no cursors are open, even if a transaction is open.



 Comments   
Comment by Githook User [ 11/Oct/18 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@10gen.com', 'username': 'mtrussotto'}

Message: SERVER-37550 Relax rules on setting readOnce flag on WiredTiger session
Branch: master
https://github.com/mongodb/mongo/commit/6bd60591fc1ab2eb8b2cc4fd85407bc4d9baf89a

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