Expand description
Write-Ahead Logging (WAL) for crash recovery
This module provides comprehensive write-ahead logging for vector index operations, enabling crash recovery and ensuring data durability. The WAL records all modifications before they are applied to the index, allowing the system to recover from crashes by replaying the log.
§Features
- Transaction-based logging
- Automatic crash recovery
- Log compaction and checkpointing
- Concurrent write support with proper synchronization
- Configurable fsync behavior for performance tuning
§Architecture
┌─────────────┐
│ Index Ops │
└──────┬──────┘
│
▼
┌─────────────┐ ┌──────────────┐
│ WAL Writer │────▶│ Log File │
└─────────────┘ └──────────────┘
│ │
│ │ (on crash)
▼ ▼
┌─────────────┐ ┌──────────────┐
│ Index │◀────│ WAL Recovery │
└─────────────┘ └──────────────┘Structs§
- WalConfig
- WAL configuration
- WalManager
- Write-Ahead Log manager
Enums§
- WalEntry
- Write-Ahead Log entry representing a single operation