pub struct TextColdDir { /* private fields */ }Implementations§
Source§impl TextColdDir
impl TextColdDir
Sourcepub fn cold_stats(&self, tokens: &[Vec<u8>]) -> (u64, u64, Vec<(Vec<u8>, u32)>)
pub fn cold_stats(&self, tokens: &[Vec<u8>]) -> (u64, u64, Vec<(Vec<u8>, u32)>)
Pass-1 contribution: summed LIVE docs/length plus per-token live df across every cold segment (one fence descent per token per segment; the doc/length halves are in-memory numbers, no I/O at all).
Sourcepub fn cold_page(&self, q: &ColdPageQuery<'_>) -> ColdPage
pub fn cold_page(&self, q: &ColdPageQuery<'_>) -> ColdPage
Pass-2 contribution: the clause-faithful cold page (see the module doc for what each clause does here).
Source§impl TextColdDir
impl TextColdDir
pub fn new() -> Self
pub fn has_cold(&self) -> bool
Sourcepub fn on_row_write(&mut self, row_key: &[u8])
pub fn on_row_write(&mut self, row_key: &[u8])
The write path saw this row change: shadow its frozen entries and withdraw its statistics, exactly, in every segment that holds it (its forward record says which, and what to subtract).
Sourcepub fn freeze_batch(
&mut self,
ts: &mut TextSegment,
index_name: &[u8],
keys: &[Vec<u8>],
segs_dir: &Path,
) -> Result<bool, String>
pub fn freeze_batch( &mut self, ts: &mut TextSegment, index_name: &[u8], keys: &[Vec<u8>], segs_dir: &Path, ) -> Result<bool, String>
Freeze keys out of the hot text segment into one sealed
bucket segment. Failure leaves the hot segment SHRUNK but the
batch unfrozen on disk — acceptable for derived spill (the
entries are rebuildable from rows), reported to the caller.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextColdDir
impl RefUnwindSafe for TextColdDir
impl Send for TextColdDir
impl Sync for TextColdDir
impl Unpin for TextColdDir
impl UnsafeUnpin for TextColdDir
impl UnwindSafe for TextColdDir
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more