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

tiered storage: lock the file handle array in the block manager

      The block manager has a file handle array, which dynamically grows.  As such, it needs to be locked, there are FIXMEs in the code.

      As long as we're there, we can make other improvements.  Eventually, we'll want to close handles that are idle, and when we do, potentially signal to the (storage source|tiered layer) that the underlying file is "evictable" from the cache (or perhaps closing the handle is the signal).

      In any event it seems that associated with each WT_FH in the array should be a reference count and a "last use timestamp".  On each open, the reference count is incremented, on each close it is decremented.  If it reaches 0, the last use timestamp is set.  A sweep can occasionally run to close "old" file handles.  And the array should not be 0-based, but based off of a variable, so it doesn't grow without bound, it will be shifted as needed.  Locking will facilitate dynamic opening of individual objects as well (right now we load up all the objects when we open a file).

            Assignee:
            keith.smith@mongodb.com Keith Smith
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: