Skip to content

CASSANDRA-21654: Coordinator node experiences read failures on ungraceful shutdown of replica - #5138

Open
isaacreath wants to merge 1 commit into
apache:cassandra-4.1from
isaacreath:CASSANDRA-21654-4.1
Open

CASSANDRA-21654: Coordinator node experiences read failures on ungraceful shutdown of replica#5138
isaacreath wants to merge 1 commit into
apache:cassandra-4.1from
isaacreath:CASSANDRA-21654-4.1

Conversation

@isaacreath

Copy link
Copy Markdown
Contributor

Currently, when a node has crashed but has not yet been evicted from Gossip, coordinator nodes can continue selecting that node as a replica for read and write requests. When this happens, messages will begin to pile up on the OutboundConnection until pendingCapacityInBytes is reached for the connection. Once this has been reached, some requests to that connection start to fail due to the connection becoming overloaded. At high throughput, this surfaces as a read failure to clients even when other nodes in the cluster are healthy and could have serviced the request.

This PR changes the behavior on read requests when a replica connection reaches the maximum pending bytes. If a table has speculative retry enabled and the coordinator node has exhausted the send queue for that replica's OutboundConnection, we will perform an immediate speculation to another replica in the cluster so long as we have not exhausted the global pool for outbound requests from the node.

If the table has configured speculative retry as NONE, or the client is using EACH_QUORUM or ALL for reads, we will not speculate to ensure that we retain the existing non-speculative behavior. Additionally, we guard this new behavior behind a feature flag, read_fallback_on_overloaded_connection, to ensure that users can safely roll out and test the new behavior in their fleets.

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