This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.7 by this push:
new f66931f39 [KYUUBI #5499][KYUUBI #2503] Catch any exception when
closing idle session
f66931f39 is described below
commit f66931f394deea9e333a89cb028adf58feb19517
Author: fwang12 <[email protected]>
AuthorDate: Tue Oct 24 21:34:42 2023 +0800
[KYUUBI #5499][KYUUBI #2503] Catch any exception when closing idle session
### _Why are the changes needed?_
Now only the KyuubiSQLException is caught when closing idle session, we
wonder some exception is not caught and cause the session timeout checkTask
exit.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run
test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests)
locally before make a pull request
### _Was this patch authored or co-authored using generative AI tooling?_
No.
Closes #5515 from turboFei/catch_check_task.
Closes #5499
Closes #2503
861248818 [fwang12] nonfatal
d4dbbfa17 [fwang12] catch exception
Authored-by: fwang12 <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit 71a45298b80d839a4b4c316607c14f6452ea5172)
Signed-off-by: Cheng Pan <[email protected]>
---
.../src/main/scala/org/apache/kyuubi/session/SessionManager.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala
b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala
index 64d3f40ce..4f2fbe2e5 100644
---
a/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala
+++
b/kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala
@@ -23,6 +23,7 @@ import java.util.concurrent.{ConcurrentHashMap, Future,
ThreadPoolExecutor, Time
import scala.collection.JavaConverters._
import scala.concurrent.duration.Duration
+import scala.util.control.NonFatal
import org.apache.hive.service.rpc.thrift.TProtocolVersion
@@ -307,8 +308,7 @@ abstract class SessionManager(name: String) extends
CompositeService(name) {
try {
closeSession(session.handle)
} catch {
- case e: KyuubiSQLException =>
- warn(s"Error closing idle session ${session.handle}", e)
+ case NonFatal(e) => warn(s"Error closing idle session
${session.handle}", e)
}
} else {
session.closeExpiredOperations()