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

recoverOplogAsStandalone mode must not start oplog truncater thread

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.3, 4.2.12, 4.0.23
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.4, v4.2, v4.0
    • Execution Team 2020-12-14

      This is observed on 4.0, but I imagine applies to 4.4 and 4.2.

      The oplog truncater thread checks for readonly, but not for recoverFromOplogAsStandalone. At startup with recoverFromOplogAsStandalone, the node will open WT in read+write mode and perform replication recovery. After replication recovery, the readOnly flag gets flipped to prevent external users from doing writes.

      Because the readonly flag is flipped after the oplog truncater thread is started up, the truncater thread can attempt to perform a write that will fail.

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: