You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(replication): benchmark and reduce duplicate state-machine snapshot buffers #382
The durable state-machine snapshot implementation retains the current snapshot in the state machine and exposes an owned Cursor<Vec<u8>> to OpenRaft. For large completed snapshots, this can mean two in-process payload buffers.
This is not a correctness problem. Snapshot durability, install, restart, and compaction recovery must remain unchanged.
Work
Benchmark snapshot build allocation, peak RSS, and latency for realistic DB and AI snapshot sizes.
Benchmark snapshot transfer latency and memory while a leader serves a snapshot to a learner.
Decide from measurements whether duplicate completed-snapshot buffers are material.
If warranted, introduce a custom OpenRaft SnapshotData type with a mutable receive representation for InstallSnapshot and a shared immutable representation for completed snapshots.
Preserve durable local recovery, installed-snapshot recovery, and chunked transport behavior with targeted tests.
Acceptance Criteria
Baseline measurements are recorded.
Any optimization is justified by those measurements.
Restart-after-compaction and install-then-restart coverage remains intact.
Snapshot receive/send behavior is tested for partial/chunked transfer.
Activity