Expand description
Persistent state management with crash recovery
§Persistent State Management with Crash Recovery
This module provides durable state management with crash recovery capabilities, ensuring data integrity and consistency across system restarts.
§Features
- Write-Ahead Logging (WAL) for durability
- Atomic state transitions with rollback capability
- State snapshots for faster recovery
- Corruption detection and recovery
- Multi-version storage with configurable retention
§Architecture
State Changes → WAL → Apply → Snapshot → Cleanup
↓ ↑
Recovery ←────────────┘Structs§
- Corruption
Event - Corruption event details
- Integrity
Report - Integrity check report
- Persistent
State Manager - Recovery
Stats - Recovery statistics
- Snapshot
Header - State snapshot header
- State
Change Event - State change event
- State
Config - State manager configuration
- WalEntry
- WAL entry structure
Enums§
- Corruption
Type - Types of corruption
- Flush
Strategy - WAL flush strategy
- Recovery
Action - Recovery actions
- Recovery
Mode - Recovery mode options
- Transaction
Type - Transaction type for WAL entries