Skip to content

HydraCache 0.40.0

Choose a tag to compare

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

HydraCache 0.40.0

0.40.0 raises the optional cluster surface from staging-ready to a
controlled internal production pilot for small, fixed 2-5 member topologies
behind a trusted network or service mesh.

This is still not a full distributed data grid. The release intentionally does
not add value replication, backup owners, durable multi-node Raft, distributed
transactions, TLS termination, certificate management, or split-brain
auto-merge.

Highlights

  • New ClusterPilotReadiness boolean gate with explicit topology, lifecycle,
    diagnostics, wire, transport, and committed-topology checks.
  • New TransportPosture with loud AUTH MISSING highlight when no HydraCache
    auth and no declared external mesh/mTLS boundary are configured.
  • New ClusterPilotReport aggregating readiness, transport posture,
    invalidation counters, owner-load/remote-fetch/hot-cache counters, barrier
    timeouts, near-cache repair counters, lifecycle counters, epoch, generation,
    and ownership stamp.
  • Quorum/read-after-write barrier support via WriteBarrierToken and
    HydraCache::read_after_write, including timeout fallback that does not
    serve known-stale local data.
  • Property coverage for restart/rejoin/generation safety.
  • Partition-table stamp, TopologyFence, RoutingMode, PartitionId,
    replica/quorum config validation, and early near-cache repair primitives.
  • New actuator route: GET /actuator/hydracache/cluster/pilot-report.
  • New sandbox route: POST /sandbox/cluster/pilot-report.
  • Ignored pilot soak gate that compiles and can be run on demand.

Changes

  • Add HydraCache::cluster_pilot_readiness,
    HydraCache::cluster_pilot_report, HydraCache::transport_posture,
    HydraCache::routing_mode, and HydraCache::cluster_topology_fence.
  • Add builder knobs:
    transport_auth_configured, strict_wire_compatibility,
    declare_mesh_boundary, routing_mode, and read_through_enabled.
  • Add explicit counters for barrier timeouts, near-cache conservative
    invalidations, lifecycle stops, and lifecycle restarts.
  • Add ClusterCacheCounters as the groupcache-style owner-load /
    remote-fetch / hot-cache split for pilot dashboards.
  • Add RaftMetadataCommand::CommitTopology and a minimal in-memory
    RaftStyleMetadataControlPlane::commit_topology helper.
  • Add MetaDataContainer and NearCacheRepairAction for early UUID-reset and
    sequence-gap near-cache repair.
  • Add partition_for_key, PartitionId, validate_replica_config, and
    ClusterReplicaConfigError.
  • Change ConsistencyMode::Quorum from unsupported fail-closed behavior to a
    wait/timeout consistency mode. ConsistencyMode::Leader remains
    fail-closed and unsupported in this release.
  • Extend hydracache-observability and hydracache-actuator-axum with pilot
    report aggregation and JSON snapshot coverage.
  • Update sandbox OpenAPI and route tests for the pilot report.
  • Bump the workspace crates to 0.40.0.

Verification

This release should pass:

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets --locked
  • cargo test --workspace --all-targets --locked
  • cargo test --doc --workspace --locked
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked
  • cargo test -p hydracache --test cluster_pilot_readiness --locked
  • cargo test -p hydracache --test cluster_restart_rejoin_property --locked
  • cargo test -p hydracache --test cluster_quorum_barrier --locked
  • cargo test -p hydracache --test cluster_counters_partition --locked
  • cargo test -p hydracache --test cluster_pilot_observability --locked
  • cargo test -p hydracache --test cluster_ownership_stamp --locked
  • cargo test -p hydracache --test cluster_routing_mode --locked
  • cargo test -p hydracache --test cluster_near_cache_repair --locked
  • cargo test -p hydracache --test cluster_topology_fence --locked
  • cargo test -p hydracache --test cluster_rollback_bypass --locked
  • cargo test -p hydracache-actuator-axum --test cluster_pilot_report_snapshot --locked
  • cargo test -p hydracache-sandbox --test cluster_staging_routes --locked

Ignored pilot soak remains manual:

cargo test -p hydracache --test cluster_pilot_soak --locked -- --ignored --nocapture

Pilot Scope

The supported pilot topology is deliberately narrow:

  • 2-5 fixed members;
  • application near-caches as clients;
  • deterministic rendezvous ownership with one owner;
  • explicit invalidation propagation;
  • owner peer-fetch/read-through for encoded cached bytes;
  • optional owner-load only for named registered loaders;
  • strict current wire compatibility;
  • HydraCache transport auth or an explicitly declared external mesh/mTLS
    boundary.

Rollback remains simple: disable cluster read-through, use local-only caches,
invalidate local entries during rollback, and ignore peer-fetch/owner-load
routes until the cluster surface is healthy again.