oplog reference may be invalidated in OplogCapMaintainer loop

XMLWordPrintableJSON

    • Storage Execution
    • Fully Compatible
    • ALL
    • v8.0, v7.0, v6.0, v5.0
    • Execution Team 2024-05-27, Execution Team 2024-06-10
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The oplog cap maintainer thread retrieves a reference to the oplog collection after acquiring the relevant resources. Part of the logic for checking if there is excess oplog storage space to recover involves temporarily releasing the acquired resources and re-acquiring them. In certain scenarios (for example, rollback), the oplog reference in the thread may be invalidated (due to the catalog being refreshed during rollback).

      One observation is that the WiredTigerRecordStore::reclaimOplog() will perform a check for excess truncate markers before actually reclaiming space from the oplog. One potential solution could be to look into removing the yielding code in favor of separate (explicit) lock acquitision scopes in the oplog cap maintainer thread.

            Assignee:
            Benety Goh
            Reporter:
            Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: