Currently a dhandle of type WT_DHANDLE_TYPE_BTREE is assumed live in a single file. I.e., it has a URI of the form, file:name.wt.
Tiered storage introduces Btrees that use tiered: URIs, which describe the combination of local files and objects that hold the BTree.
The goal of this ticket is to update the WiredTiger code so that a single dhandle can represent either form of BTree. This will ensure that various bits of code that make decisions based on dhandle->type == WT_DHANDLE_TYPE_BTREE will continue to work without needing to know that there are two different ways the BTree might be representing on the underlying storage.
This will consist of the following pieces of work:
- Introduce new dhandle flags to indicate whether a btree is stored in a single file or a tiered set of files/objects
- Eliminate the WT_DHANDLE_TYPE_TIERED and WT_DHANDLE_TYPE_TIERED_TREE types in favor of appropriate settings of the above flags.
- Examine existing code that performs checks for dhandle->type == WT_DHANDLE_TYPE_BTREE and ensure that the above changes won't break anything.
- Examine existing code that performs checks for WT_PREFIX_MATCH(uri, "file:") and update as needed to make sure it will behave correctly for tiered Btrees.