Follower drop's uncheckpointed-data check is not atomic with the drop

XMLWordPrintableJSON

    • Storage Engines - Foundations
    • 387.804
    • None
    • None

      WT-18405 added __drop_layered_check_ingest_durable(), which refuses a follower drop when the ingest contains writes newer than the last picked-up checkpoint.

      The check releases the ingest dhandle before __drop_file() acquires it for the actual close. During that gap, another session can commit a newer write and release the handle. The drop can then proceed without rechecking and discard the in-memory ingest data.

      The schema and table locks do not prevent layered cursor writes during this window.

      Fix direction: perform the durability check under the same exclusive dhandle lock used to close the ingest tree.

      This ticket is created as an outcome of this PR discussion thread: https://github.com/wiredtiger/wiredtiger/pull/14470#discussion_r3817926892

      Related: WT-18386 tracks the separate problem of TRIM being issued before the local drop is guaranteed to succeed.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Salman Javed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: