Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60761

Global readOnly flag should not be switched on and off after startup

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Execution Team 2022-04-04, Execution Team 2022-04-18, Execution Team 2022-05-02

      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.

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: