Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-12028

Change block manager's handle array to be a hash table

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • StorEng - Defined Pipeline

      For tiered tables, the block manager maintains an array, WT_BM.handle_array, of pointers to the block handles it has opened for the table.

      When reading a block, the block manager cracks the address cookie to get the objectid for the block, and then walks this array looking for a handle (i.e., a *WT_BLOCK) for reading data from that object. 

      In practice, this array could get fairly large  It is easy to imagine a workload that routinely adds new records to a tiered table and performs lookups across the entire table. If we flush once per hour, this table will get 720 new objects per month, and more than 8,000 in a year. That's large enough that we don't want to pay the cost of linearly scanning all open handles on every read.

      We can address this by making the handle array a hash table instead. 

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            keith.smith@mongodb.com Keith Smith
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: