You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/03/25 16:46:53 UTC

[GitHub] [incubator-kyuubi] cxzl25 commented on a change in pull request #2208: Fixed session close operator log session dir not deleted

cxzl25 commented on a change in pull request #2208:
URL: https://github.com/apache/incubator-kyuubi/pull/2208#discussion_r835444874



##########
File path: kyuubi-common/src/main/scala/org/apache/kyuubi/session/SessionManager.scala
##########
@@ -89,10 +89,23 @@ abstract class SessionManager(name: String) extends CompositeService(name) {
     if (session == null) {
       throw KyuubiSQLException(s"Invalid $sessionHandle")
     }
+    deleteOperationLogSessionDir(sessionHandle)

Review comment:
       When the `closeSession` method is called, the operation is not necessarily close. At this time, there are log files, and the log may also increase.
   
   When `session.close()`, it will close the operation first.
   
   So it is suggested here that `deleteOperationLogSessionDir` should be placed after `session.close()`
   Also because `Files.deleteIfExists` can only delete empty folders, consider using `org.apache.kyuubi.Utils#deleteDirectoryRecursively`.




-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org