Skip to content

Remove inFlightEcho entry on ECHO_REQ failure#4865

Open
grom358 wants to merge 1 commit into
apache:cassandra-5.0from
instaclustr:CASSANDRA-21428-5.0
Open

Remove inFlightEcho entry on ECHO_REQ failure#4865
grom358 wants to merge 1 commit into
apache:cassandra-5.0from
instaclustr:CASSANDRA-21428-5.0

Conversation

@grom358
Copy link
Copy Markdown
Contributor

@grom358 grom358 commented Jun 4, 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-5.0 branch from ace5203 to a373053 Compare June 5, 2026 07:56
@smiklosovic smiklosovic force-pushed the CASSANDRA-21428-5.0 branch from a373053 to 83bf57c Compare June 6, 2026 16:09
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