Skip queuing non-evictable stale disaggregated pages during eviction walk

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Cache and Eviction
    • None
    • Storage Engines, Storage Engines - Transactions
    • 0.026
    • None
    • None

      Follow-up optimization to WT-18125.

      Background

      WT-18125 fixes a cache stall where pages on a stale disaggregated read-only btree (WT_BTREE_DISAGGREGATED | WT_BTREE_READONLY with an OUTDATED dhandle) could get stuck in eviction. The fix handles these pages at eviction time in __wt_evict: if the page is not clean-evictable and a reader still holds the handle, keep it resident (return EBUSY); otherwise force a clean discard so it is not routed to a dirty split that can never write back to shared storage.

      Improvement

      The eviction walk currently queues such pages and lets the eviction worker attempt and fail them. As an optimization, the walk could detect a stale disaggregated btree and skip queuing pages that are known not to be evictable, before they are added to the eviction queue. The natural place is a condition in __wt_page_can_evict (checked at the "fast" label in the walk's queue path), or an earlier skip alongside the existing per-tree skip logic in the eviction walk.

      Note

      Skipping at walk time complements, but does not replace, the _wt_evict handling: urgent eviction can still trigger eviction of a page even when it was never queued by the walk, so the in-_wt_evict path must remain.

      Reviewer suggestion (PR #14276): add a condition in page_can_evict or similar before the page is added to the queue; expected to be a small change.

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

              Created:
              Updated: