You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Rishabh Saraswat (Jira)" <ji...@apache.org> on 2026/03/11 20:17:00 UTC

[jira] [Updated] (CASSJAVA-124) CEP-59: Add GRACEFUL_DISCONNECT support to Java driver

     [ https://issues.apache.org/jira/browse/CASSJAVA-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rishabh Saraswat updated CASSJAVA-124:
--------------------------------------
    Description: 
See [CEP-59 |https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=406619103]
See [Server side |https://issues.apache.org/jira/browse/CASSANDRA-21191]
Adds GRACEFUL_DISCONNECT support to the Java driver. The driver now 
detects server-side graceful disconnect support and subscribes to the 
event on all connections, allowing it to react gracefully when a node 
is shutting down.

Flow:
1. Driver sends OPTIONS to server
2. If SUPPORTED response contains GRACEFUL_DISCONNECT: ["true"], driver 
   adds GRACEFUL_DISCONNECT to event types before sending REGISTER
3. REGISTER is sent to server subscribing to GRACEFUL_DISCONNECT event. 
4. Upon receiving GRACEFUL_DISCONNECT event on a connection, driver marks 
   that node as down in the load balancing policy so new requests are 
   routed to other healthy nodes
5. In-flight requests on the draining connection complete normally
6. Driver closes the connection once all in-flight requests are done

Since the driver already maintains connections to all nodes, no 
reconnection is needed — requests are simply routed to already-connected 
healthy nodes.

  was:
Adds GRACEFUL_DISCONNECT support to the Java driver. The driver now 
detects server-side graceful disconnect support and subscribes to the 
event on all connections, allowing it to react gracefully when a node 
is shutting down.

Flow:
1. Driver sends OPTIONS to server
2. If SUPPORTED response contains GRACEFUL_DISCONNECT: ["true"], driver 
   adds GRACEFUL_DISCONNECT to event types before sending REGISTER
3. REGISTER is sent to server subscribing to GRACEFUL_DISCONNECT event. 
4. Upon receiving GRACEFUL_DISCONNECT event on a connection, driver marks 
   that node as down in the load balancing policy so new requests are 
   routed to other healthy nodes
5. In-flight requests on the draining connection complete normally
6. Driver closes the connection once all in-flight requests are done

Since the driver already maintains connections to all nodes, no 
reconnection is needed — requests are simply routed to already-connected 
healthy nodes.


> CEP-59: Add GRACEFUL_DISCONNECT support to Java driver
> ------------------------------------------------------
>
>                 Key: CASSJAVA-124
>                 URL: https://issues.apache.org/jira/browse/CASSJAVA-124
>             Project: Apache Cassandra Java driver
>          Issue Type: New Feature
>            Reporter: Rishabh Saraswat
>            Assignee: Rishabh Saraswat
>            Priority: Normal
>
> See [CEP-59 |https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=406619103]
> See [Server side |https://issues.apache.org/jira/browse/CASSANDRA-21191]
> Adds GRACEFUL_DISCONNECT support to the Java driver. The driver now 
> detects server-side graceful disconnect support and subscribes to the 
> event on all connections, allowing it to react gracefully when a node 
> is shutting down.
> Flow:
> 1. Driver sends OPTIONS to server
> 2. If SUPPORTED response contains GRACEFUL_DISCONNECT: ["true"], driver 
>    adds GRACEFUL_DISCONNECT to event types before sending REGISTER
> 3. REGISTER is sent to server subscribing to GRACEFUL_DISCONNECT event. 
> 4. Upon receiving GRACEFUL_DISCONNECT event on a connection, driver marks 
>    that node as down in the load balancing policy so new requests are 
>    routed to other healthy nodes
> 5. In-flight requests on the draining connection complete normally
> 6. Driver closes the connection once all in-flight requests are done
> Since the driver already maintains connections to all nodes, no 
> reconnection is needed — requests are simply routed to already-connected 
> healthy nodes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org