pub struct LsmManager { /* private fields */ }Expand description
LSM manager for segment lifecycle
Implementations§
Source§impl LsmManager
impl LsmManager
Sourcepub fn new(config: EngineConfig, data_dir: PathBuf) -> Self
pub fn new(config: EngineConfig, data_dir: PathBuf) -> Self
Create a new LSM manager
Sourcepub fn load_from_catalog(
&self,
catalog: &Catalog,
collection_id: i64,
) -> Result<()>
pub fn load_from_catalog( &self, catalog: &Catalog, collection_id: i64, ) -> Result<()>
Load existing segments from catalog
Sourcepub fn get_query_segments(&self) -> Vec<Arc<Segment>>
pub fn get_query_segments(&self) -> Vec<Arc<Segment>>
Get all segments for querying (newest first)
Sourcepub fn is_tombstoned(&self, segment_id: SegmentId, vec_id: VectorId) -> bool
pub fn is_tombstoned(&self, segment_id: SegmentId, vec_id: VectorId) -> bool
Check if a vector is tombstoned
Sourcepub fn compact(&self, catalog: &Catalog, _collection_id: i64) -> Result<()>
pub fn compact(&self, catalog: &Catalog, _collection_id: i64) -> Result<()>
Run compaction (merge multiple segments into one)
Sourcepub fn vector_count(&self) -> u32
pub fn vector_count(&self) -> u32
Get total vector count
Auto Trait Implementations§
impl !Freeze for LsmManager
impl !RefUnwindSafe for LsmManager
impl Send for LsmManager
impl Sync for LsmManager
impl Unpin for LsmManager
impl UnsafeUnpin for LsmManager
impl UnwindSafe for LsmManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more