pub struct TombstoneManager { /* private fields */ }Expand description
Tombstone manager for high-level operations
Implementations§
Source§impl TombstoneManager
impl TombstoneManager
pub fn new(collection_path: &Path) -> Self
Sourcepub fn load_registry(&self) -> Result<TombstoneRegistry>
pub fn load_registry(&self) -> Result<TombstoneRegistry>
Load the tombstone registry
Sourcepub fn save_registry(&self, registry: &TombstoneRegistry) -> Result<()>
pub fn save_registry(&self, registry: &TombstoneRegistry) -> Result<()>
Save the tombstone registry
Sourcepub fn mark_file_deleted(
&self,
file_handle: u32,
path: PathBuf,
current_epoch: u64,
segment_id: u32,
segment_offset: u64,
) -> Result<()>
pub fn mark_file_deleted( &self, file_handle: u32, path: PathBuf, current_epoch: u64, segment_id: u32, segment_offset: u64, ) -> Result<()>
Mark a file as deleted by adding a tombstone
Sourcepub fn filter_live_handles(&self, handles: Vec<u32>) -> Result<Vec<u32>>
pub fn filter_live_handles(&self, handles: Vec<u32>) -> Result<Vec<u32>>
Check if search results should filter out tombstoned files
Sourcepub fn get_compaction_candidates(
&self,
before_epoch: u64,
) -> Result<Vec<Tombstone>>
pub fn get_compaction_candidates( &self, before_epoch: u64, ) -> Result<Vec<Tombstone>>
Get compaction candidates (old tombstones that can be cleaned up)
Sourcepub fn compact_tombstones(&self, before_epoch: u64) -> Result<usize>
pub fn compact_tombstones(&self, before_epoch: u64) -> Result<usize>
Perform tombstone compaction (remove old tombstones)
Sourcepub fn get_stats(&self) -> Result<TombstoneStats>
pub fn get_stats(&self) -> Result<TombstoneStats>
Get tombstone statistics
Auto Trait Implementations§
impl Freeze for TombstoneManager
impl RefUnwindSafe for TombstoneManager
impl Send for TombstoneManager
impl Sync for TombstoneManager
impl Unpin for TombstoneManager
impl UnwindSafe for TombstoneManager
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