pub struct LSMConfig {
pub memtable_size_limit: usize,
pub level0_compaction_threshold: usize,
pub bloom_bits_per_key: usize,
pub sstable_cache_size: Option<usize>,
pub sstable_cache_memory_limit_mb: Option<usize>,
pub block_size: Option<usize>,
pub enable_compression: Option<bool>,
pub compression_algorithm: Option<CompressionAlgorithm>,
pub tombstone_ttl_secs: Option<u64>,
}Expand description
LSM 树配置
Fields§
§memtable_size_limit: usizeMemTable 大小限制(字节)
level0_compaction_threshold: usizeLevel 0 SSTable 数量阈值(触发合并)
bloom_bits_per_key: usizeBloom filter bits per key (higher = less false positives, more memory)
sstable_cache_size: Option<usize>SSTable cache entry count (None = storage default 128)
sstable_cache_memory_limit_mb: Option<usize>SSTable cache memory limit in MB (None = storage default 200MB)
block_size: Option<usize>SSTable block size in bytes (None = storage default 64KB)
enable_compression: Option<bool>Enable SSTable block compression (None = storage default: true)
compression_algorithm: Option<CompressionAlgorithm>Compression algorithm for SSTable blocks (None = storage default: Zstd)
tombstone_ttl_secs: Option<u64>Tombstone TTL in seconds: deleted entries older than this are physically dropped during compaction. 0 = drop all tombstones immediately. None = use internal default (86400 = 24h).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LSMConfig
impl<'de> Deserialize<'de> for LSMConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LSMConfig
impl RefUnwindSafe for LSMConfig
impl Send for LSMConfig
impl Sync for LSMConfig
impl Unpin for LSMConfig
impl UnsafeUnpin for LSMConfig
impl UnwindSafe for LSMConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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