lightning-L commented on code in PR #4545:
URL: https://github.com/apache/kyuubi/pull/4545#discussion_r1142865697


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala:
##########
@@ -157,19 +157,20 @@ class SparkSQLSessionManager private (name: String, 
spark: SparkSession)
   }
 
   override def closeSession(sessionHandle: SessionHandle): Unit = {
-    if (!userIsolatedSparkSession) {
-      val session = getSession(sessionHandle)
-      if (session != null) {
-        userIsolatedCacheLock.synchronized {
-          if (userIsolatedCacheCount.containsKey(session.user)) {
-            val (count, _) = userIsolatedCacheCount.get(session.user)
-            userIsolatedCacheCount.put(session.user, (count - 1, 
System.currentTimeMillis()))
+    try {
+      super.closeSession(sessionHandle)
+
+      if (!userIsolatedSparkSession) {

Review Comment:
   yes, it is useful for CONNECTION share level (spark engine will not be 
stopped and app could finish even though client connection dies for some 
reasons). For GROUP share level, no need to wait 



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