You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/07/19 03:15:45 UTC
[GitHub] [incubator-kyuubi] wuchunfu commented on a change in pull request #822: [KYUUBI 821] Improper exception for closing a non-existent session
wuchunfu commented on a change in pull request #822:
URL: https://github.com/apache/incubator-kyuubi/pull/822#discussion_r671960454
##########
File path: kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala
##########
@@ -66,11 +66,11 @@ abstract class SessionManager(name: String) extends CompositeService(name) {
def closeSession(sessionHandle: SessionHandle): Unit = {
_latestLogoutTime = System.currentTimeMillis()
val session = handleToSession.remove(sessionHandle)
- if (session == null) {
- throw KyuubiSQLException(s"Invalid $sessionHandle")
+ if (session != null) {
+ session.close()
+ } else {
+ warn(s"$sessionHandle is closed, current opening sessions $getOpenSessionCount")
Review comment:
Sorry, I don't know how to fix it. Please give me some guidance.
--
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: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org