Module persistent_state

Module persistent_state 

Source
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§

CorruptionEvent
Corruption event details
IntegrityReport
Integrity check report
PersistentStateManager
RecoveryStats
Recovery statistics
SnapshotHeader
State snapshot header
StateChangeEvent
State change event
StateConfig
State manager configuration
WalEntry
WAL entry structure

Enums§

CorruptionType
Types of corruption
FlushStrategy
WAL flush strategy
RecoveryAction
Recovery actions
RecoveryMode
Recovery mode options
TransactionType
Transaction type for WAL entries