pub struct PrefixMatch {
pub matched_blocks: Vec<u32>,
pub matched_disk_block_ids: Vec<u32>,
pub matched_tokens: usize,
pub ssm_snapshot: Option<usize>,
pub ssm_snapshot_tokens: usize,
pub ssm_snapshot_tier_key: Option<u64>,
pub ssm_snapshot_tier_tokens: usize,
pub ssm_snapshot_is_tail: bool,
}Expand description
Result of looking up a token sequence in the prefix cache.
Fields§
§matched_blocks: Vec<u32>Physical KV cache block indices to reuse (in order).
matched_disk_block_ids: Vec<u32>--high-speed-swap disk-block IDs parallel to matched_blocks
(Phase 6.1.e). Empty when HSS is not in use. Same length as
matched_blocks when populated. Caller must inc_disk_ref each
before treating them as live (the cache itself does not
retain disk-side refs — see RadixTree::lookup for the bump).
matched_tokens: usizeNumber of tokens matched (always block-aligned).
ssm_snapshot: Option<usize>SSM state snapshot ID at the deepest matched node (Marconi caching).
When Some, the caller can restore SSM h_state + conv_state from
this snapshot and skip SSM computation for the matched prefix.
ssm_snapshot_tokens: usizeNumber of tokens covered by ssm_snapshot (Marconi intermediate checkpoints).
With leaf-only snapshots this equals matched_tokens. With intermediate
checkpoints it may be less — the caller must recompute SSM state for
tokens between ssm_snapshot_tokens and matched_tokens.
ssm_snapshot_tier_key: Option<u64>Phase 1b spill tier: when the deepest anchor for this prefix is SPILLED
(not resident in HBM), ssm_snapshot is None and this holds the tier
key (prefix hash). The caller faults the bytes into a fresh snapshot slot
(SsmSnapshotPool::fault_in_slot), promote_snapshots the entry, then
restores. None whenever nothing is tiered (i.e. ATLAS_SSM_TIER off) —
so this field is inert on the default path.
ssm_snapshot_tier_tokens: usizeToken depth covered by ssm_snapshot_tier_key (analogue of
ssm_snapshot_tokens for a tiered anchor).
ssm_snapshot_is_tail: boolWhether the matched SSM snapshot is a TAIL (bleeds past the exact prefix). The restore site session-gates only tails; exact and is_tail_sibling snapshots are content-addressed (safe cross-session).
Implementations§
Trait Implementations§
Source§impl Clone for PrefixMatch
impl Clone for PrefixMatch
Source§fn clone(&self) -> PrefixMatch
fn clone(&self) -> PrefixMatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more