pub struct Fifo {
pub limit: u64,
pub ttl_seconds: Option<u64>,
}
Expand description
FIFO-style compaction
Limits the tree size to roughly limit
bytes, deleting the oldest segment(s)
when the threshold is reached.
Will also merge segments if the amount of segments in level 0 grows too much, which could cause write stalls.
Additionally, a (lazy) TTL can be configured to drop old segments.
§Caution
Only use it for specific workloads where:
- You only want to store recent data (unimportant logs, …)
- Your keyspace grows monotonically (e.g. time series)
- You only insert new data (no updates)
Fields§
§limit: u64
Data set size limit in bytes
ttl_seconds: Option<u64>
TTL in seconds, will be disabled if 0 or None
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnwindSafe for Strategy
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