CASSJAVA-124: Add GRACEFUL_DISCONNECT support (CEP-59)#2091
Open
Shanzita wants to merge 7 commits into
Open
Conversation
… the event somehow
- Handle GRACEFUL_DISCONNECT event in InFlightHandler to drain in-flight requests - Register for GRACEFUL_DISCONNECT on both control and data connections - Add graceful-disconnect-enabled config option (default true) - Detect server support from SUPPORTED response in ChannelFactory - Add GRACEFUL_DISCONNECTS metric enums - Add unit tests for InFlightHandler and ControlConnection - Clean up WIP debug logging Co-authored-by: Jane He <jane.he@datastax.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements client-side support for CEP-59 (Graceful
Disconnect - In-Band Connection Draining) in the Java driver.
When a Cassandra node shuts down, it emits a
GRACEFUL_DISCONNECT event to subscribed connections. The
driver:
Changes
graceful drain
connections
ChannelFactory
advanced.connection.graceful-disconnect-enabledconfig option (default true)
level
Testing
(omniCoder77/cassandra:feature/cep-59/metrics)
when disabled
Depends on: native-protocol 1.5.3-SNAPSHOT
(SiyaoIsHiding/native-protocol:cep-59)
JIRA: CASSJAVA-124