Add victim-cache put-level Catch2 unit test with mocked plh_cache_put

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • None
    • Storage Engines - Persistence
    • 56.633
    • SE Persistence backlog
    • None

      Background

      WT-18626 fixed a stale-image bug where the disaggregated victim cache cached page->dsk under a block_meta that already described a newer reconciled image. PR #14717 added a Catch2 test for the image-resolution helper __evict_page_disagg_image().

      Goal

      Add a put-level Catch2 unit test that drives __evict_page_victim_cache() with a mocked WT_PAGE_LOG_HANDLE::plh_cache_put (and plh_cache_available) so we can assert the exact buffer, size and metadata passed to the block cache for each reconciliation-result state:
      * no reconciliation result → page->dsk cached
      * WT_PM_REC_REPLACE with retained image → mod_disk_image cached
      * WT_PM_REC_REPLACE without retained image, WT_PM_REC_MULTIBLOCK, WT_PM_REC_EMPTY → nothing cached

      Notes

      Mocking the page-log / block-cache layer may require adding a test-only page-log handle or extending existing test helpers. This is likely a larger piece of work than the helper-level test.

      Acceptance Criteria* New Catch2 test under test/catch2/misc_tests/ registered in test/catch2/CMakeLists.txt.

      • Test fails when the cache put uses page->dsk or the wrong image_size, and passes with the WT-18626 fix.
      • Ticket linked to WT-18626 as "Relates to".

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

              Created:
              Updated: