Expand description
Write engine for SSTable generation and persistence (M5)
This module provides the write path for CQLite, implementing WAL-backed memtable flushing and K-way merge for producing valid Cassandra 5.0 SSTables.
§Architecture
The WriteEngine is the public API that coordinates:
- WAL (Write-Ahead Log) - Durability
- Memtable - In-memory buffer
- SSTableWriter - On-disk persistence
§Write Flow
- User calls
write(mutation)orexecute(cql_statement) - WriteEngine appends to WAL (durability)
- WriteEngine inserts into Memtable
- When Memtable exceeds threshold → flush to SSTable
- After successful flush → truncate WAL
§Recovery
On startup, the WriteEngine replays WAL entries into the memtable.
Re-exports§
pub use export::ExportOptions;pub use export::ExportReport;pub use memtable::Memtable;pub use merge::KWayMerger;pub use merge_policy::STCSPolicy;pub use mutation::CellOperation;pub use mutation::ClusteringBound;pub use mutation::ClusteringKey;pub use mutation::DecoratedKey;pub use mutation::Mutation;pub use mutation::PartitionKey;pub use mutation::PartitionTombstone;pub use mutation::RangeTombstone;pub use mutation::TableId;pub use wal::WriteAheadLog;
Modules§
- cql_
to_ mutation - CQL AST to Mutation conversion.
- export
- SSTable export functionality for M5.2 (Issue #388)
- memtable
- In-memory write buffer (memtable)
- merge
- K-way merge for combining multiple L0 SSTables
- merge_
policy - Compaction merge policies for SSTable selection (M5.2)
- mutation
- Mutation types for CQL write operations
- wal
- Write-ahead log (WAL) for crash recovery
Structs§
- Compaction
Stats - Cumulative statistics across all compaction operations (M5.2, Issue #474)
- Maintenance
Report - Maintenance report from a maintenance_step() call (M5.2, Issue #384)
- Write
Engine - Write engine coordinator
- Write
Engine Config - Write engine configuration
Enums§
- Durability
- WAL durability mode for the write engine.
Traits§
- Merge
Policy - Trait for merge policy implementations (M5.2, Issue #383)