You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "turboFei (via GitHub)" <gi...@apache.org> on 2026/06/04 20:24:53 UTC

[PR] [KYUUBI #XXXX] Do not block server shutdown on batch sessions [kyuubi]

turboFei opened a new pull request, #7498:
URL: https://github.com/apache/kyuubi/pull/7498

   ## Why
   
   `ServiceDiscovery.stopGracefully` waits for `getActiveUserSessionCount > 0` to reach zero before shutting down. This count includes batch sessions, which are just handles to jobs running on external clusters (YARN/K8s). Those jobs can run for hours or days — causing the server to hang indefinitely on shutdown.
   
   ## What
   
   Introduces a `closeOnServerStop` flag on the `Session` trait (default `true` — fully backward-compatible with all existing session types).
   
   `KyuubiBatchSession` overrides it to `false`. `ServiceDiscovery.stopGracefully` now waits only for sessions where `closeOnServerStop = true`, so batch sessions no longer block server shutdown.
   
   ## Changes
   
   - `Session` trait: add `closeOnServerStop: Boolean = true`
   - `KyuubiBatchSession`: override to `false`
   - `ServiceDiscovery.stopGracefully`: switch from `getActiveUserSessionCount` to `allSessions().count(_.closeOnServerStop)`
   
   ## Test plan
   
   - [ ] Server shuts down promptly when only batch sessions are active
   - [ ] Server still waits for active interactive sessions before shutting down
   - [ ] Batch jobs continue running on cluster after server restart


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #XXXX] Do not block server shutdown on batch sessions [kyuubi]

Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei closed pull request #7498: [KYUUBI #XXXX] Do not block server shutdown on batch sessions
URL: https://github.com/apache/kyuubi/pull/7498


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #XXXX] Do not block server shutdown on batch sessions [kyuubi]

Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei closed pull request #7498: [KYUUBI #XXXX] Do not block server shutdown on batch sessions
URL: https://github.com/apache/kyuubi/pull/7498


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org