Skip to content

Commit

Permalink
[KYUUBI-2422] Wrap close session with try-finally (#2836)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-you authored Jun 9, 2022
1 parent 27bfa68 commit cbca761
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ abstract class SessionManager(name: String) extends CompositeService(name) {
throw KyuubiSQLException(s"Invalid $sessionHandle")
}
info(s"$sessionHandle is closed, current opening sessions $getOpenSessionCount")
session.close()
deleteOperationLogSessionDir(sessionHandle)
try {
session.close()
} finally {
deleteOperationLogSessionDir(sessionHandle)
}
}

private def deleteOperationLogSessionDir(sessionHandle: SessionHandle): Unit = {
Expand Down

0 comments on commit cbca761

Please sign in to comment.