As part of WT-10462, we stopped allowing local files to be deleted from an open tiered table. Specifically, when we queue a work item to delete the local file, it will always find the file "in use" while the table is open.
WT-10838 will let us determine when a file is not in use by tracking the number of active read requests to each WT_BLOCK. We can use this to allow deletion of files that have been copied to object storage.
There are two likely approaches:
- Periodically check to see of the file is idle, and if so delete the local file allowing future reads to be handled by the copy in object storage
- Proactively switch to reading from object storage instead of the local file. At some point we stop issuing new reads to the WT_BLOCK for the local file and set a flag indicating that when the read count goes to zero it should be deleted. During this time new reads to that objectID would go to a new WT_BLOCK backed by the cloud object.
- causes
-
WT-12151 Fix incorrect read-only initialization of bm->switch_object_end method
- Closed
- depends on
-
WT-10838 Track active read count for tiered storage block handles
- Closed
- is depended on by
-
WT-11720 Sweep Block handles for multi-handle (tiered) block managers
- Backlog
- is duplicated by
-
WT-10995 Investigate problems with tiered storage local_retention retaining files.
- Closed