HydraCache 0.47.0
HydraCache 0.47.0
0.47.0 adds the cross-region session consistency slice: session context,
read-your-writes, monotonic reads and writes, writes-follow-reads via bounded
causal dependencies, convergence plus explicit bounded staleness, and session
lifecycle observability.
The release does not claim cross-region linearizability or distributed
transactions. It makes the application-session contract explicit and testable:
requests may move between regions, but a verified session token carries the
bounded context needed to avoid stale self-reads, backwards reads, reordered
session writes, and effect-before-cause visibility.
Highlights
- Added
SessionId,SessionWatermark,SessionToken,SessionRequest, and
VersionStampfor bounded, tamper-evident session context propagation. - Added
SessionReadBudget,ReadEscalation,resolve_session_read, and
serve_session_readso read-your-writes either serves safely, escalates, or
fails loud instead of serving below the session watermark. - Added monotonic guards:
SessionSequence,SessionWriteStamp,
resolve_monotonic_read,apply_monotonic_read,
resolve_monotonic_write, andapply_monotonic_write. - Added
CausalSummary,AppliedSet,CausalWrite,causal_apply, and
apply_causal_write. Overflow coarsens conservatively through a stable floor
instead of silently dropping dependencies. - Added convergence and freshness helpers:
converge_replicated_values,
SessionReadMode,StalenessBound,resolve_session_read_mode, and
within_staleness_bound. - Added session lifecycle helpers:
SessionTtl,
validate_session_lifecycle,rebuild_expired_sessionless, and
recover_session_after_failover. - Added aggregate session observability with
SessionStats, registered
session metric descriptors, and session alert rules that obey the bounded
cardinality rule.
Verification
Focused gates:
cargo test -p hydracache --locked session_context
cargo test -p hydracache --locked session_ryw
cargo test -p hydracache --locked session_monotonic
cargo test -p hydracache --locked causal_consistency
cargo test -p hydracache --locked convergence_staleness
cargo test -p hydracache-observability --locked session_observability
cargo test -p hydracache --locked fault_injector_selftestImplementation checks used during the release work:
cargo fmt --all
cargo test -p hydracache --locked session_context
cargo test -p hydracache --locked session_ryw
cargo test -p hydracache --locked session_monotonic
cargo test -p hydracache --locked causal_consistency
cargo test -p hydracache --locked convergence_staleness
cargo test -p hydracache-observability --locked session_observabilityScope Boundary
This is causal+ session consistency, not a global transaction layer. It orders a
session's causally related operations and keeps concurrent writes convergent via
the existing CRDT and merge-policy machinery. Operators still own topology,
durability, WAN transport, repair budgets, token-secret management, and any
stronger consistency guarantees above the library surface.
Release Status
Implemented as the 0.47.0 release slice after the focused gates above. The
workspace version remains on the current published line until the explicit
publish step.