Expand description
§Storage Synchronization
Coordinates data synchronization between Turso (durable) and redb (cache) storage layers.
The synchronizer ensures:
- Two-phase commit for consistency
- Conflict resolution with Turso as source of truth
- Periodic synchronization of cache from durable storage
- Resilience to partial failures
§Example
ⓘ
use do_memory_core::sync::StorageSynchronizer;
let sync = StorageSynchronizer::new(turso_storage, redb_storage);
sync.start_periodic_sync(Duration::from_secs(300)).await;Structs§
- Storage
Synchronizer - Storage synchronizer for coordinating Turso and redb
- Sync
Config - Configuration for storage synchronization
- Sync
State - Synchronization state tracking
- Sync
Stats - Synchronization statistics
- TwoPhase
Commit - Two-phase commit strategy for episode storage
Enums§
- Conflict
Resolution - Conflict resolution strategy
Functions§
- resolve_
episode_ conflict - Resolve conflict between two episodes
- resolve_
heuristic_ conflict - Resolve conflict between two heuristics
- resolve_
pattern_ conflict - Resolve conflict between two patterns