pub struct AdaptiveMemtableSizer { /* private fields */ }Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Expand description
Adaptive memtable sizer with memory pressure feedback
Dynamically adjusts memtable flush threshold based on:
- Write rate (to maintain target buffer duration)
- Memory pressure (to avoid OOM)
Implementationsยง
Sourceยงimpl AdaptiveMemtableSizer
impl AdaptiveMemtableSizer
Sourcepub fn new() -> Self
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn new() -> Self
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Create a new adaptive sizer with default configuration
Sourcepub fn with_config(config: AdaptiveMemtableConfig) -> Self
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn with_config(config: AdaptiveMemtableConfig) -> Self
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Create with custom configuration
Sourcepub fn record_write(&self, bytes: usize)
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn record_write(&self, bytes: usize)
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Record bytes written (call on every write)
Sourcepub fn current_size(&self) -> usize
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn current_size(&self) -> usize
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Get current recommended memtable size
Sourcepub fn write_rate(&self) -> f64
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn write_rate(&self) -> f64
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Get estimated write rate in bytes per second
Sourcepub fn memory_pressure(&self) -> f64
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn memory_pressure(&self) -> f64
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Get current memory pressure (0.0 - 1.0)
Sourcepub fn update(&self) -> usize
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn update(&self) -> usize
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Update the adaptive size (call periodically, e.g., every second)
Returns the new recommended memtable size
Sourcepub fn should_flush(&self, current_memtable_bytes: u64) -> bool
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn should_flush(&self, current_memtable_bytes: u64) -> bool
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Check if the memtable should be flushed based on current size
Sourcepub fn stats(&self) -> AdaptiveMemtableStats
๐Deprecated: Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
pub fn stats(&self) -> AdaptiveMemtableStats
Unused duplicate memtable; live memtables are lscs::ColumnarMemtable + durable_storage::MvccMemTable. Scheduled for removal (Task 2 consolidation).
Get statistics for monitoring
Trait Implementationsยง
Auto Trait Implementationsยง
impl !Freeze for AdaptiveMemtableSizer
impl RefUnwindSafe for AdaptiveMemtableSizer
impl Send for AdaptiveMemtableSizer
impl Sync for AdaptiveMemtableSizer
impl Unpin for AdaptiveMemtableSizer
impl UnsafeUnpin for AdaptiveMemtableSizer
impl UnwindSafe for AdaptiveMemtableSizer
Blanket Implementationsยง
impl<T> Allocation for T
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
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>
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>
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