Skip to content

v0.3.2 — Container Restart Persistence Fix & Deterministic XXH3 Hasher

Choose a tag to compare

@vubon vubon released this 06 Nov 18:03
· 13 commits to main since this release

[v0.3.2] — 2026-11-07

🐛 Bug Fixes & Persistence Reliability

  • Zero KV Data Loss on Container Restarts (dump.kdb):
    • Fixed a shutdown ordering race where worker threads dropped their thread-local SlabPool arenas upon exiting their event loop before the snapshot worker could capture state. Dropping pools unregistered MegaslabArenas from GLOBAL_ARENAS, causing resolve_slot_ptr() to return None and overwriting dump.kdb with 0 KV keys.
    • Introduced ShutdownBarrier in kachedb-net, ensuring worker threads pause after halting network event loops while keeping their memory pools fully allocated and registered.
    • The main server thread now deterministically halts connection dispatch, signals background workers, performs the final shutdown snapshot, and only then releases worker threads for orderly memory reclamation.
  • Cross-Process Deterministic Key Hashing (kachedb-hash):
    • Switched hash_key in SwissTable from per-process randomized AHasher::default() to xxhash_rust::xxh3::xxh3_64.
    • Guarantees that key hashes saved in dump.kdb remain 100% deterministic and reachable across server and container restarts across all CPU architectures.
    • Added deterministic hash stability regression tests in crates/kachedb-hash.
  • Dynamic Version Metadata & Python Bindings:
    • Synchronized HELLO, INFO, and daemon startup logs to compile-time env!("CARGO_PKG_VERSION").
    • Bumped Python bindings in bindings/python to 0.3.2.