ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Block Cache
    • None
    • Storage Engines - Persistence
    • 44.978
    • StorEng - Defined Pipeline
    • None

      Part of WT-18574, on the block-cache-depr feature branch. Strips the legacy cache's interactions with shared block I/O while the implementation still exists — every merged commit stays buildable and dist/s_funcs/dist/s_stat-clean.

      Work in block_io.c

      • _wt_blkcache_read / wt_blkcache_read_multi: remove the wti_blkcache_get/_wti_blkcache_put paths, the cache-hit branches (and the metadata loop in _read_multi), skip_cache_put, and the ref-count decrement.
      • __wt_blkcache_write: remove the cache_on_checkpoint/cache_on_writes/delta_count put gate and its bypass_chkpt/bypass_writealloc counter updates.
      • Delete __blkcache_cache_wants_encrypted_data and the cache-item selection.
      • Remove _wt_blkcache_remove and the now-unused WT_BLKCACHE locals from bm_free (block_mgr.c) and bmd_free (block_disagg_mgr.c), preserving the free results — including _bmd_free returning the discard result.

      Delete from block_cache.c in the same PR

      Functions left without callers fail dist/s_funcs; counters left without updaters fail dist/s_stat — no temporary exemption-list entries for either.

      • _wti_blkcache_get, wti_blkcache_put, wt_blkcache_remove, and their exclusive helpers blkcache_alloc, blkcache_estimate_filesize, _blkcache_verbose.
      • The 17 counters whose last updaters are the functions deleted here — block_cache_lookups, block_cache_hits, block_cache_misses, block_cache_bypass_get, block_cache_bypass_filesize, block_cache_bypass_put, block_cache_bypass_overhead_put, block_cache_bypass_chkpt, block_cache_bypass_writealloc, block_cache_blocks_insert_read, block_cache_blocks_insert_write, block_cache_bytes_insert_read, block_cache_bytes_insert_write, block_cache_blocks_update, block_cache_bytes_update, block_cache_blocks_removed, block_cache_blocks_removed_blocked.
      • _blkcache_high_overhead is not deleted here — its _blkcache_should_evict caller lives until S1, which deletes both. This ticket therefore merges before S1.
      • Keep the destroy helpers: _blkcache_free, blkcache_print_reference_hist, _blkcache_update_ref_histogram.
      • Regenerate prototypes (extern.h via dist/s_all).

      Preserve

      Shared I/O helper names/signatures, _blkcache_read_corrupt/blkcache_read_decrypt, mmap's found path, compression/encryption/checksums, checkpoint vs final-checkpoint dispatch, base+delta buffer ownership, block_byte* stats, checkpoint_rec_blkcache_write. Scratch-buffer cleanup stays on every error path. Data must still be decrypted exactly once once the encrypted/decrypted cache branches are gone.

      Acceptance

      • Encrypted+compressed tests with and without mmap, corruption/salvage/verify, checkpoint, and disagg base+delta tests pass; ASan clean.
      • Strict builds and dist/s_all (including s_funcs and s_stat) pass with this change alone.
      • The remaining open/destroy code stays buildable until S3.

      Dependencies

      Phase T gate, including T2 (the FIXME-WT-15663 skip must be gone before this closes the ticket). Must merge before S1. Blocks S3. Close WT-15663 as Won't Fix once merged — its buggy cached-read path (__wti_blkcache_get) is gone.

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

              Created:
              Updated: