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.
- related to
-
SERVER-91777 Opt out of oplog sampling during restore
- Closed