-
Type:
Technical Debt
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Block Manager, Btree
-
None
-
Storage Engines - Foundations
-
12.835
-
None
-
None
Context
PR 14913 changes how WiredTiger identifies shared trees: https://github.com/wiredtiger/wiredtiger/pull/14913
The follow-up comes from this review discussion: https://github.com/wiredtiger/wiredtiger/pull/14913#discussion_r4265693507
Today, shared-tree state is split between two objects. WT_BTREE_DISAGGREGATED identifies both live shared btrees and checkpoint views. WT_DHANDLE_SHARED_CKPT identifies only checkpoint-view dhandles. This works, but it divides one classification between WT_BTREE and WT_DATA_HANDLE and uses both the terms disaggregated and shared.
Proposed Change
Make WT_DATA_HANDLE the source of truth for runtime shared-tree classification. Add WT_DHANDLE_SHARED to every shared dhandle and keep WT_DHANDLE_SHARED_CKPT for checkpoint views. Replace runtime uses of WT_BTREE_DISAGGREGATED with these dhandle flags and clearly named helper functions.
The state model is:
- Local tree: both flags are clear.
- Live shared tree: only WT_DHANDLE_SHARED is set.
- Shared checkpoint view: both flags are set.
Set these flags when the dhandle configuration is established from block_manager=disagg or the legacy .wt_stable fallback. Runtime and hot-path code must use the dhandle state without performing a metadata lookup. Callers without a dhandle must continue to use an explicit URI/config classifier. The legacy name fallback remains until WT-18866 removes it.
Acceptance Criteria
- Every open shared btree has WT_DHANDLE_SHARED set, and WT_DHANDLE_SHARED_CKPT always implies WT_DHANDLE_SHARED.
- Live shared trees and shared checkpoint views can be distinguished using only dhandle state.
- WT_BTREE_DISAGGREGATED is removed as a separate source of shared-tree state, or any remaining uses are justified.
- Tests cover local, live shared, shared checkpoint, config-identified shared, and legacy .wt_stable trees.
- is related to
-
WT-18866
Remove the .wt_stable name checks at btree open once no database has legacy shared metadata entries
-
- Open
-