zllovesuki / specter

like ngrok, but more ambitious with DHT for flavor
MIT License
26 stars 1 forks source link

kv/aof: implement append only persistence #19

Closed zllovesuki closed 2 years ago

zllovesuki commented 2 years ago

This commit introduces a new chord.KVProvider implementation that will persist most kv mutations to disk with append-only logs, and restoring the in-memory state on start-up by replaying the logs. Lease operations are not persisted as they are deemed volatile, and the new KV implementation is meant for persisting SimpleKV and PrefixKV which they are much more useful in case the node crashes.