pan3793 commented on code in PR #7167:
URL: https://github.com/apache/kyuubi/pull/7167#discussion_r2259475724


##########
kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala:
##########
@@ -345,10 +345,15 @@ abstract class SessionManager(name: String) extends 
CompositeService(name) {
     if (idleTimeout > 0) {
       val checkTask = new Runnable {
         override def run(): Unit = {
-          if (!shutdown && System.currentTimeMillis() - latestLogoutTime > 
idleTimeout &&
-            getActiveUserSessionCount <= 0) {
-            info(s"Idled for more than $idleTimeout ms, terminating")
-            stop()
+          if (!shutdown) {
+            if (System.currentTimeMillis() - latestLogoutTime > idleTimeout &&
+              getActiveUserSessionCount <= 0) {
+              info(s"Idled for more than $idleTimeout ms, terminating")
+              stop()
+            } else if (isEngineContextStopped) {
+              error(s"Engine context is stopped, terminating")

Review Comment:
   ```suggestion
                 error(s"Engine's SparkContext is stopped, terminating")
   ```



-- 
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]

Reply via email to