Skip to content

fix(dist-cache): enable gossip by default to fix silent node-rejoin failure#115

Merged
hyp3rd merged 1 commit into
mainfrom
feat/dist-mem-cache
May 7, 2026
Merged

fix(dist-cache): enable gossip by default to fix silent node-rejoin failure#115
hyp3rd merged 1 commit into
mainfrom
feat/dist-mem-cache

Conversation

@hyp3rd
Copy link
Copy Markdown
Owner

@hyp3rd hyp3rd commented May 7, 2026

Previously, no gossip interval was configured for the distributed memory backend, causing dist_memory.startGossipIfEnabled to bail out silently (gossipInterval <= 0). This meant that after a graceful drain and restart, the rejoining node had no mechanism to re-introduce itself to cluster peers: heartbeats only probe nodes already in membership, and the Health endpoint is one-way. The drained node would remain invisible to the rest of the cluster forever.

Changes:

  • Add defaultGossip = 1s constant and GossipInt env-config field (HYPERCACHE_GOSSIP_INTERVAL), defaulting to the heartbeat cadence so gossip + heartbeat together disseminate membership changes within a couple of ticks
  • Wire backend.WithDistGossipInterval(cfg.GossipInt) into buildHyperCache
  • Set LastAccess on items handled by the HTTP Set endpoint
  • Add TestLoadConfigGossipInterval pinning both the > 0 default and the env-override path

…ailure

Previously, no gossip interval was configured for the distributed memory
backend, causing `dist_memory.startGossipIfEnabled` to bail out silently
(gossipInterval <= 0). This meant that after a graceful drain and restart,
the rejoining node had no mechanism to re-introduce itself to cluster peers:
heartbeats only probe nodes already in membership, and the Health endpoint is
one-way. The drained node would remain invisible to the rest of the cluster
forever.

Changes:
- Add `defaultGossip = 1s` constant and `GossipInt` env-config field
  (`HYPERCACHE_GOSSIP_INTERVAL`), defaulting to the heartbeat cadence so
  gossip + heartbeat together disseminate membership changes within a couple
  of ticks
- Wire `backend.WithDistGossipInterval(cfg.GossipInt)` into `buildHyperCache`
- Set `LastAccess` on items handled by the HTTP Set endpoint
- Add `TestLoadConfigGossipInterval` pinning both the > 0 default and the
  env-override path
@hyp3rd hyp3rd self-assigned this May 7, 2026
@hyp3rd hyp3rd merged commit 71d48e3 into main May 7, 2026
14 of 15 checks passed
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