Skip to content

Feat/dist mem cache#111

Open
hyp3rd wants to merge 2 commits intomainfrom
feat/dist-mem-cache
Open

Feat/dist mem cache#111
hyp3rd wants to merge 2 commits intomainfrom
feat/dist-mem-cache

Conversation

@hyp3rd
Copy link
Copy Markdown
Owner

@hyp3rd hyp3rd commented May 5, 2026

No description provided.

hyp3rd added 2 commits May 5, 2026 21:27
…covery

Add `scripts/tests/20-test-cluster-resilience.sh`, a 6-phase E2E script
that validates distributed cache behaviour under a real Docker network:

- Phase 1: seeds a pre-failure key batch across all 5 nodes
- Phase 2: hard-stops `hypercache-3`, waits for surviving nodes to mark
  it suspect/dead via heartbeat
- Phase 3: writes a second batch during the outage (quorum on 4 nodes,
  hints queued for the down node — Phase B.2 contract)
- Phase 4: asserts surviving nodes serve every pre- and during-outage key
- Phase 5: restarts the killed node
- Phase 6: polls the resurrected node until it converges on the full state
  within 60 s (hint replay / anti-entropy paths)

24 assertions across the 6 phases. Catches regressions in hint-replay and
anti-entropy that in-process tests cannot reach.

Wire the script into the `test-cluster` Makefile target (runs after the
smoke test, gated on smoke success, exit-code propagated through the
existing teardown trap) and into the `cluster` CI workflow as a follow-up
step after the cross-node smoke.

Minor: fix arithmetic spacing in `wait-for-cluster.sh` to pass shellcheck.
…nation

Implement SWIM self-refute so a node receiving a suspect/dead claim
about itself at incarnation >= local bumps its incarnation and re-marks
Alive, propagating the refutation cluster-wide via higher-incarnation-wins.

Wire cross-process gossip over HTTP:
- Add Gossip(ctx, targetID, members) to DistTransport interface
- Add POST /internal/gossip server endpoint (auth-wrapped)
- Introduce GossipMember wire DTO with projection helpers
- runGossipTick now falls through to the HTTP transport for
  non-InProcessTransport clusters (previously a no-op)

Swap encoding/json for github.com/goccy/go-json in the server binary.

Remove the experimental qualifier from heartbeat/failure-detection
docs — indirect probes (Phase B.1) and self-refutation (Phase E)
together provide the SWIM guarantees the marker was tracking.

Tests: TestDistSWIM_HTTPGossipExchange, TestDistSWIM_SelfRefute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant