ExportXMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fix Not Needed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Checkpoints
    • None
    • Storage Engines, Storage Engines - Transactions
    • 0.005
    • SE Transactions - 2026-09-25, SE Transactions - 2026-10-09
    • 2

      Summary

      In disaggregated storage, fast-truncating every child of an internal page leaves the page empty and dirty. The next checkpoint reconciles it, writing proxy cells for the deleted children (removal is deferred until the deletions are globally visible) and leaving the page clean. While the page stays resident and clean, every later checkpoint skips it, and removing its deleted children falls to checkpoint cleanup, which must page the internal page back in to make progress. Cleanup is throttled by checkpoint_cleanup=(wait=...) and can be disabled outright, so removal can be delayed arbitrarily long even though everything needed to perform it is already in cache.

      Concentrating this discovery in checkpoint cleanup also makes it a burst: while the oldest timestamp is pinned, deleted children accumulate; when it jumps forward, one cleanup pass finds the whole backlog at once — reading non-resident internal pages back from the page service, dirtying parents in bulk, and making the next checkpoint reconcile them all at once. Evaluating visibility at every checkpoint for pages already in cache spreads the work across the regular checkpoint cadence. Non-resident pages remain checkpoint cleanup's job — the checkpoint walk never reads pages in — so this shrinks each cleanup pass's backlog rather than replacing it.

      Approach

      • In _wt_sync_file() (src/btree/bt_sync.c), when the checkpoint walk visits a clean internal page of a disaggregated, writable btree, scan its page index for a child in WT_REF_DELETED whose deletion is globally visible (_wti_delete_page_skip(session, child, true)). On the first hit, initialize the page modify structure and dirty the page, so reconciliation removes the deleted children and propagates the removal up the tree. Reconciliation checks every child anyway, so finding one removable child is sufficient.
      • After reconciliation, if an internal page of a disaggregated btree is clean and empty, mark it for soon eviction so the emptied page leaves the cache promptly.
      • Add test_disagg_fast_truncate03.test_checkpoint_cleans_up_visible_deleted_children: fast-truncate a range, reconcile the emptied internal pages clean, make the deletions globally visible, checkpoint, and assert that reconciliation deleted pages (rec_page_delete increases) without checkpoint cleanup removing anything (checkpoint_cleanup_pages_removed unchanged).

      Definition of done

      • A checkpoint removes globally visible deleted children of a resident clean internal page without involving checkpoint cleanup.
      • The new test fails without the change and passes with it.

      Split out of WT-18565.

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

              Created:
              Updated:
              Resolved: