[SERVER-60761] Global readOnly flag should not be switched on and off after startup Created: 15/Oct/21  Updated: 29/Oct/23  Resolved: 22/Apr/22

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

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-04-04, Execution Team 2022-04-18, Execution Team 2022-05-02
Participants:

 Description   

We toggle the storageGlobalParams.readOnly flag on and off in multiple places like startup recovery and recoverFromOplogAsStandalone.

This is problematic for background storage engine operations like the TimestampMonitor, which can never guarantee that they are actually able to write without throwing an exception.

Ideally, the readOnly flag would not be changeable. Maybe it could be a property of the ServiceContext rather than a global. Or maybe it should be a property of an OperationContext that certain internal operations can opt-out of.



 Comments   
Comment by Githook User [ 22/Apr/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-60761 Move the global read-only flag to be an OperationContext function
Branch: master
https://github.com/mongodb/mongo/commit/90d6271d2f663a4aaf633de5e362972e50e90c21

Comment by Githook User [ 22/Apr/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-60761 Move the global read-only flag to be an OperationContext function
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/00e1d0b4ed2a35987f1c21bc8b5579c9f17cc9fe

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