Skip to content

HydraCache 0.46.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 15:46
· 1239 commits to main since this release

HydraCache 0.46.0

0.46.0 adds the cluster-resilience and coordination slice: tunable
per-operation consistency levels, bounded hinted handoff, incremental Merkle
repair, a phi-accrual failure detector, single-key conditional writes with a
fenced lock, and a replayable invalidation ring.

The release keeps the 0.45 active-active contract unchanged. The new APIs make
the messy middle explicit and testable: brief replica outages, flapping
liveness, divergent replicas, stale lock holders, and subscribers that missed
invalidations. They do not add distributed transactions or global
cross-region linearizability.

Highlights

  • Added ConsistencyLevel (One, LocalQuorum, Quorum, EachQuorum,
    All), ReadOptions, WriteOptions, AckRequirement, and loud
    ConsistencyUnsatisfiable errors.
  • Added bounded hinted handoff with Hint, HintBudget,
    InMemoryHintStore, replay decisions, repair marks for expired/over-budget
    hints, and a guard that hints never fake a required consistency ack.
  • Added Merkle repair primitives: MerkleTree, RepairSession,
    RepairToken, foreground read-repair, incremental skip behavior, and
    tombstone-preserving freshness selection.
  • Added PhiAccrualDetector, Liveness, liveness metrics, and explicit
    gates for repair/handoff and ownership changes.
  • Added SingleKeyConditionalStore with compare_and_set, put_if_absent,
    single-key scope guard, FenceToken, and stale-token rejection for fenced
    locks.
  • Added InvalidationRing, InvalidationEvent, exact replay by sequence,
    ReplayResult::FellBehind ClearPartition fallback, overrun metrics, and a
    snapshot/restore surface for durable adapters.

Verification

Focused gates:

cargo test -p hydracache --locked consistency_levels
cargo test -p hydracache --locked hinted_handoff
cargo test -p hydracache --locked merkle_repair
cargo test -p hydracache --locked failure_detector
cargo test -p hydracache --locked conditional_writes
cargo test -p hydracache --locked invalidation_ring

Implementation checks used during the release work:

cargo fmt --all
cargo test -p hydracache --locked consistency_levels
cargo test -p hydracache --locked hinted_handoff
cargo test -p hydracache --locked merkle_repair
cargo test -p hydracache --locked failure_detector
cargo test -p hydracache --locked conditional_writes
cargo test -p hydracache --locked invalidation_ring

Scope Boundary

This is an assisted cluster-resilience surface. Operators still own topology,
durability adapters, outage policy, and tuning budgets. Conditional writes are
strictly single-key and require Quorum/EachQuorum/All; hinted handoff and
the invalidation ring are bounded and observable; phi suspicion never changes
ownership without committed topology.

Release Status

Implemented as the 0.46.0 release slice after the focused gates above. The
workspace version remains on the current published line until the explicit
publish step.