dajiaohuang opened a new pull request, #7797: URL: https://github.com/apache/kyuubi/pull/7797
Fixes #7590. ### Why are the changes needed? When SparkContext stops before engine shutdown reaches `stopServer()`, the latch in `SparkSQLEngine.main` is never released and the main thread can wait indefinitely. Polling the latch lets the main thread exit once SparkContext is stopped without calling `engine.stop()` again from the wait loop. Earlier PRs #7592 and #7680 are closed and unmerged. ### How was this patch tested? - `./dev/reformat` — passed. - `./build/mvn -Dtest=none -DwildcardSuites=org.apache.kyuubi.engine.spark.SparkSQLEngineSuite -pl externals/kyuubi-spark-sql-engine -am test` — 3 tests passed using task-local Temurin 8u504 and Maven 3.9.14. The regression test uses a synthetic stopped-context predicate; no real Spark, Hadoop, or Kyuubi service was contacted. - `git diff --check` — passed. ### Was this patch assisted by generative AI tooling? Assisted-by: Pi worker dev-w11@stew-c1-4w (openai-codex/gpt-6-luna). -- 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]
