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

Rishabh Saraswat reassigned CASSANDRA-21207:
--------------------------------------------

    Assignee: Rishabh Saraswat

> CEP-59: Drain in-flight requests on subscribed connections before shutdown
> --------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21207
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21207
>             Project: Apache Cassandra
>          Issue Type: Sub-task
>          Components: Messaging/Client
>            Reporter: Rishabh Saraswat
>            Assignee: Rishabh Saraswat
>            Priority: Normal
>
> Depends on: CASSANDRA-21206
> After emitting GRACEFUL_DISCONNECT, the server now waits for in-flight 
> requests to complete before proceeding with drain. This ensures clients 
> can finish processing their outstanding requests without client-visible 
> timeouts or errors.
> The draining logic respects the following timeouts:
>  - graceful_disconnect_grace_period_ms — time given to clients to stop 
>   sending new requests after GRACEFUL_DISCONNECT is emitted
>  - graceful_disconnect_max_drain_ms — hard timeout after which connections 
>   are force-closed regardless of in-flight requests
> Flow:
> 1. GRACEFUL_DISCONNECT event emitted to subscribed connections
> 2. Wait grace_period_ms for clients to stop sending new requests
> 3. Wait for all in-flight requests to complete on subscribed connections
> 4. If max_drain_ms exceeded, force-close remaining connections
> 5. Proceed with drain(false)
> Non-subscribed connections continue with existing behavior. When both 
> subscribed and non-subscribed connections exist, all connections continue 
> processing requests until gracefully-draining connections are closed or 
> timed out.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to