Skip to content

CASSPYTHON-16: Add GRACEFUL_DISCONNECT event support (CEP-59) - #1306

Open
Shanzita wants to merge 2 commits into
apache:trunkfrom
Shanzita:CASSPYTHON-16-graceful-disconnect
Open

Shanzita wants to merge 2 commits into
apache:trunkfrom
Shanzita:CASSPYTHON-16-graceful-disconnect

Conversation

@Shanzita

Copy link
Copy Markdown

Implements client-side handling of the GRACEFUL_DISCONNECT event
(CASSANDRA-21191 / CEP-59) for the Python driver.

When a node announces a graceful shutdown, the driver drains in-flight
requests on the affected connections before closing them and fails new
requests over to other nodes, instead of surfacing connection errors to the
application.

The capability is negotiated per connection against the server's SUPPORTED
response, controlled by the Cluster graceful_disconnect_enabled option
(enabled by default), and a graceful_disconnects counter is added to Metrics.

Testing:

  • Unit tests covering capability negotiation, connection and pool draining,
    and control-connection handling.
  • CCM drain integration test.

JIRA: https://issues.apache.org/jira/browse/CASSPYTHON-16

Implement client-side handling of the GRACEFUL_DISCONNECT event
(CASSANDRA-21191 / CEP-59). When a node announces a graceful shutdown, the
driver drains in-flight requests on the affected connections before closing
them and fails new requests over to other nodes, instead of surfacing
connection errors to the application.

The capability is negotiated per connection against the server's SUPPORTED
response, controlled by the Cluster graceful_disconnect_enabled option
(enabled by default), and a graceful_disconnects counter is added to Metrics.

Adds unit tests for capability negotiation, connection and pool draining, and
control-connection handling, plus a CCM drain integration test.
…iver into CASSPYTHON-16-graceful-disconnect

# Conflicts:
#	CHANGELOG.rst
#	cassandra/cluster.py
#	cassandra/metrics.py

This branch has not been deployed

No deployments
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