Skip to content

Remove inFlightEcho entry on ECHO_REQ failure#4867

Open
grom358 wants to merge 2 commits into
apache:cassandra-4.0from
instaclustr:CASSANDRA-21428-4.0
Open

Remove inFlightEcho entry on ECHO_REQ failure#4867
grom358 wants to merge 2 commits into
apache:cassandra-4.0from
instaclustr:CASSANDRA-21428-4.0

Conversation

@grom358
Copy link
Copy Markdown
Contributor

@grom358 grom358 commented Jun 5, 2026

In Gossiper, echoHandler only implements onResponse. RequestCallback.onFailure has a default no-op, so when the ECHO_REQ times out or the remote node returns an error, inflightEcho.remove(addr) is never called. The stale entry persists. Any subsequent markAlive(addr, localState) call — where localState is the same in-place-mutated object already in inflightEcho — sees localState.equals(prevState) = true (identity equality, same reference) and skips indefinitely. In a temporary-partition scenario (node briefly unreachable, echo times out, node recovers with the same generation), the node can get stuck permanently dead: the failure detector sees it as alive and keeps triggering markAlive, but every invocation is suppressed by the stale entry. The stale entry is only cleared by removeEndpoint() (explicit removal) or silentlyMarkDead() via markDead() (failure detector conviction) — neither of which fires if the failure detector is reporting the node as healthy.

Fix: override onFailure in echoHandler to call inflightEcho.remove(addr).

@smiklosovic smiklosovic force-pushed the CASSANDRA-21428-4.0 branch from df1685f to 2b35d82 Compare June 5, 2026 07:53
@smiklosovic smiklosovic force-pushed the CASSANDRA-21428-4.0 branch from 2b35d82 to 06a6103 Compare June 6, 2026 16:13
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.

2 participants