ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0, 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: Btree
    • None
    • Storage Engines - Transactions
    • 296.842
    • SE Transactions - 2026-12-04
    • None

      Symptom

      On a disaggregated-storage primary, checkpoint cleanup counts the same fast-truncated child refs as removed on every pass and re-dirties their parent internal pages, indefinitely and with no writes in the workload. Internal pages whose children are all such refs reconcile to empty on every checkpoint and are never evicted.

      Customer FTDC from an Atlas Infinite primary (HELP-103587), per cleanup pass of about 5 minutes, flat for more than 10 hours:

      • checkpoint-cleanup: pages removed: about 1.4 million
      • reconciliation: pages deleted (reconciled to empty): about 42,900
      • cache: dirty internal page cannot be evicted in disaggregated storage: about 41,000
      • about 230 MB of dirty stable internal pages after each pass; each checkpoint writes about 0.6 MB of internal pages

      The oplog accounts for 99.98% of these counts (local.oplog.rs.stats). The loop is not what triggered IWM's ingress rate limiter in that case; it is a separate defect.

      Cause

      1. Once a fast-truncate is globally visible, _sync_obsolete_deleted_cleanup dirties the parent of the WT_REF_DELETED ref. The next reconciliation of the parent (_rec_child_deleted) frees the leaf block, clears ref->addr, frees ref->page_del and writes no cell for the child. The ref stays in the parent's in-memory page index, still WT_REF_DELETED, now with page_del == NULL and no address.
      2. On the next pass _sync_obsolete_cleanup_one reaches the same ref. _wt_page_del_visible_all(NULL) returns true ("previously found to be globally visible"), so the ref is counted again and the parent is dirtied again. Nothing distinguishes an already-resolved ref from a new deletion.
      3. The ref leaves the in-memory index only when its parent page is evicted (or split, or reverse-split by __evict_delete_ref). Reconciling the grandparent does not remove an empty internal page from the grandparent's in-memory index.
      4. On local storage the loop ends: the tree walk marks the empty internal page evict-soon and it is queued for urgent eviction even while dirty, and key-level obsolete time-window cleanup eventually makes an idle table ineligible for cleanup. In disaggregated storage a dirty internal page cannot be evicted, the eviction server skips internal pages and stable btrees in the window after the checkpoint cleans them, and key-level time-window cleanup is disabled (WT-18558), so the table stays eligible and the pages are re-dirtied on every pass.

      Reproducer

      Python test test_disagg_checkpoint_cleanup01: a three-level tree, fast-truncate part of the key space, make the truncate globally visible, then repeat one checkpoint cleanup pass plus one checkpoint. After reclamation is done, every further pass still counts about 90 refs as removed and 5 internal pages reconcile to empty, with no page read or evicted. The local-storage scenario of the same test converges within two rounds.

      Expected

      A deleted ref that an earlier reconciliation has already removed from the disk image (page_del == NULL and no address) is not counted as removed again and does not dirty its parent.

      Related

      • HELP-103587: customer benchmark where the loop was observed
      • WT-18550: earlier fix for a no-progress cleanup rewrite of fully deleted disaggregated internal pages before the truncate is globally visible
      • WT-18558: disabled key-level checkpoint cleanup for disaggregated storage

            Assignee:
            Shoufu Du
            Reporter:
            Shoufu Du
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: