Skip to main content

Crate featherdb_storage

Crate featherdb_storage 

Source
Expand description

Storage engine for FeatherDB

This crate provides the low-level storage components:

  • Page management and file I/O
  • B-tree data structure
  • Buffer pool with pluggable eviction policies (Clock, LRU-2, LIRS)
  • Write-ahead logging (WAL)
  • Crash recovery
  • Adaptive page compression (LZ4/ZSTD)

Re-exports§

pub use compression::create_compressor;
pub use compression::CompressedPageHeader;
pub use compression::CompressionStats;
pub use compression::CompressionStatsSnapshot;
pub use compression::CompressionType;
pub use compression::Compressor;
pub use compression::PageCompressor;

Modules§

compression
Adaptive Page Compression for FeatherDB

Structs§

BTree
B-tree key-value store
BufferPool
The buffer pool - caches pages in memory
BufferPoolStats
Statistics for the buffer pool
BufferPoolStatsSnapshot
Immutable snapshot of buffer pool statistics
ClockEviction
Clock eviction policy (second-chance algorithm)
FileManager
Manages file I/O for the database
FreeList
Bitmap-based free page tracking
LirsEviction
LIRS (Low Inter-reference Recency Set) eviction policy
Lru2Eviction
LRU-2 eviction policy
Page
A database page (4KB by default)
PageGuard
RAII guard for reading a page
RecoveryStats
Statistics returned from crash recovery
SlotEntry
Slot array entry - points to a cell in the page
StorageEngine
The storage engine, managing all disk I/O and page caching
StorageQuota
Storage quota information
Wal
Write-Ahead Log manager with group commit support
WalRecord
A WAL record
WalStats
Statistics for WAL operations
WalStatsSnapshot
Immutable snapshot of WAL statistics

Enums§

EvictionPolicyType
Buffer pool eviction policy type
PageType
Page type discriminator
WalRecordType
WAL record types

Traits§

EvictionPolicy
Eviction policy trait
EvictionPolicyFactory
Extension trait for creating eviction policies