Re-use the size field in the disagg address cookie to track aggregate size.

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • WT12.0.0
    • Affects Version/s: None
    • Component/s: Checkpoints
    • None
    • Storage Engines, Storage Engines - Persistence
    • SE Persistence - 2026-01-30
    • None

      In order to know the full size of a b-tree in disaggregated storage we need to track aggregate block size using the __wt_block_disagg_address_cookie-size field. Essentially a block size will be the size of the base + subsequent deltas. 

      In order to track the cumulative size we populate a WT_PAGE_BLOCK_META field. 

      This is read in via __block_disagg_read_multiple.

      In the write path we check if the block_meta indicates the presence of deltas, if so we add the size from block_meta to the size being written. This is found in __wti_block_disagg_write

      A Catch2 unit test may be the only path to testing change.

      Because we are changing the meaning of cookie->size we will need to change the version of the cookie, for this see WT_BLOCK_DISAGG_ADDR_VERSION and {}wti_block_disagg_addr_unpack. That function will need to be able to read version 0 cookies, while also reading the new version. There should be no changes to support reading version 0 cookies while writing version 1 cookies. The changes will come later when we support b-tree & database level size tracking.

      Scope:

      • Update the definition of size in disagg address cookie
      • Track delta encoded sizes
      • Implement a catch2 unit test to ensure block meta tracking is correct.

       

            Assignee:
            Mariam Mojid
            Reporter:
            Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: