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

Don't hold the block handle array lock when opening a handle.

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.2.0, 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      When we read from a tiered table and need a block from an object we haven't opened yet, we open a new block handle for it in __wt_blkcache_get_handle().

      Currently we hold a write lock on the block handle array while doing this. This is undesirable as it prevents other threads from accessing the table (i.e., performing reads while we open the new handle. And opening the new handle may be slow as it could involve system calls and or network requests to block storage.

      We should create the new handle without the lock and only take the lock when we insert the new handle in the block handle array. If we race with another thread, we will find a handle already in the table and teardown the one we created.

            Assignee:
            keith.smith@mongodb.com Keith Smith
            Reporter:
            keith.smith@mongodb.com Keith Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: