Add a block cache key extractor to the block manager

XMLWordPrintableJSON

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

      The block cache currently uses address cookies as keys for its hash table, which has worked out well so far. However, in order to implement caching on write for disag. (WT-14794), we would most likely need the block manager to provide a mechanism to convert an address cookie into a key that could be used in the block cache.

      We would need the following two functions to the block manager:

      • Given an address cookie, create a key that the block cache should use for the page in the block cache.
      • Given a key (or an address cookie?), create a key for the previous version of the page, if possible—i.e., if the previous version only has one fewer delta.

      We'd need the latter so that the block cache can match a new delta with the previous version of the page to create a new, complete entry for the new version of the page. (That being said, if we could come up with an alternative approach that doesn't require this, we should definitely consider it!)

      The attached storage BM should continue working with the existing block cache without having to perform unnecessary memory allocations or copies. We can achieve this by having it return the original address cookie and then somehow instructing the caller to not free that memory, or maybe we could make those methods optional, with the block cache defaulting to using address cookies as keys.

      Furthermore, if we are not using address cookies at keys, it may be worth storing the full address cookie in the cache entry as a way to check correctness (we could also do this as a separate ticket).

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

                Created:
                Updated: