ruanwenjun opened a new pull request, #7829: URL: https://github.com/apache/kyuubi/pull/7829
### Why are the changes needed? Fixes #7828. An engine that never responds to a cleanup RPC can keep the server's cancellation handler holding operation and client locks indefinitely. Expired-operation cleanup then waits for the same operation lock and stalls the shared session timeout-checker. Add the administrator-controlled, server-only `kyuubi.session.engine.cleanup.timeout` (default `PT1M`). A single deadline covers operation/client lock acquisition, the cleanup RPC response, and companion probe cleanup. On timeout or interruption, invalidate the session's engine client, close both transports, cancel the in-flight request, and stop its executors. Local timeout monitors and operation logs are cleaned up even when operation-lock acquisition fails. Successful cancellation keeps the session usable. Ordinary query and result-fetching RPCs retain their existing timeout behavior. A timed-out cleanup invalidates the whole session client and reports engine-side cleanup as unconfirmed; it does not terminate a shared engine or guarantee remote resource reclamation. ### How was this patch tested? - Added 13 client regression tests using a local Thrift/SASL test engine, plus configuration validation. Tests cover unresponsive cleanup RPCs, both lock waits, a shared timeout budget, interruption, responsive probes, companion-probe shutdown, executor termination, and continued session timeout checking. The original implementation failed the six initial blocking regressions while the two normal-behavior cases passed. - Maven focused suites: 42 tests passed on Java 11 (`KyuubiSyncThriftClientSuite`, `KyuubiOperationSuite`, `KyuubiConfSuite`, `AllKyuubiConfiguration`). - Re-ran all 13 client tests on Java 8 and on Java 21 with `-Dkyuubi.server.virtualThreads.enabled=true`; both passed. - Regenerated configuration docs with `dev/gen/gen_all_config_docs.sh`; ran `dev/reformat`, Spotless checks, and `git diff --check`. No production cluster was used. The full test suite has not been run locally. ### Was this patch assisted by generative AI tooling? Assisted-by: Codex (GPT-6) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
