pub struct SlotFetch {
pub found: bool,
pub data: Option<Vec<u8>>,
pub lsn: u64,
pub slot_index: usize,
pub bin_arc: Arc<RwLock<TreeNode>>,
}Expand description
Combined search result carrying slot data and the BIN arc, returned by
Tree::search_with_data.
Avoids the double-descent pattern where Tree::search checked key
existence and a second call re-descended to fetch the actual slot bytes.
One descent now serves both purposes (Wave-11-I optimisation).
Fields§
§found: booltrue if an exact key match was found and is not expired.
data: Option<Vec<u8>>Data bytes for the slot (None when found is false).
lsn: u64Raw slot LSN as u64; zero when found is false.
slot_index: usizeSlot index within the BIN. Set to the actual BIN slot index when
found is true; 0 otherwise.
Used by CursorImpl to set current_index correctly so that
retrieve_next advances to the right slot after a search.
bin_arc: Arc<RwLock<TreeNode>>Arc to the BIN that the descent reached. Always Some when the
tree has at least one node, regardless of whether found is true.