Add Catch2 unit tests for disaggregated victim-cache eligibility

XMLWordPrintableJSON

    • Storage Engines - Persistence
    • 56.658
    • SE Persistence backlog
    • None

      Background

      WT-18626 fixed a stale-image bug in the disaggregated victim cache. The fix introduced *evict_page_disagg_image() to resolve the correct on-disk image for a page's current *disagg_info->block_meta. That helper is covered by the new Catch2 test in PR #14717.

      Goal

      Add eligibility-level unit tests that exercise __evict_page_victim_cache_eligible() directly (via a new HAVE_UNITTEST wrapper if needed) and verify that it returns false and leaves the out image NULL for all cases that must not enter the victim cache:
      * non-disaggregated btree
      * checkpoint-cursor btree
      * internal page
      * root page
      * cold-storage-tier btree
      * disagg_info == NULL
      * invalid page_id
      * reconciliation result is split / empty / replace without retained image

      Acceptance Criteria

      • New Catch2 test file under test/catch2/misc_tests/ registered in test/catch2/CMakeLists.txt.
      • Tests fail on a build where the eligibility check reverts to the pre-WT-18626 logic, and pass with the fix.
      • Ticket linked to WT-18626 as "Relates to".

            Assignee:
            Etienne Petrel
            Reporter:
            Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: