Description
After per-CF WAL (#157), each column family has its own WAL. If a CF is written heavily but never flushed, its WAL grows unbounded, eventually filling the disk.
Implementation
- Add WAL size limit per CF (configurable, default: 512MB)
- When a WAL exceeds the limit:
- Force flush the CF's memtable
- Archive the WAL segment to
<db>/wal-archive/{cf}-{seq}.wal
- Create a fresh WAL for the CF
- Archive retention policy:
- Keep last N archive segments
- Auto-delete archives older than T days
- WAL archive serves as additional crash recovery layer
Configuration
resilience:
wal:
max_size_per_cf_mb: 512
archive_retention_count: 10
archive_retention_days: 7
Labels
Description
After per-CF WAL (#157), each column family has its own WAL. If a CF is written heavily but never flushed, its WAL grows unbounded, eventually filling the disk.
Implementation
<db>/wal-archive/{cf}-{seq}.walConfiguration
Labels