cxzl25 commented on code in PR #4688:
URL: https://github.com/apache/kyuubi/pull/4688#discussion_r1161712456


##########
kyuubi-common/src/main/scala/org/apache/kyuubi/operation/log/OperationLog.scala:
##########
@@ -195,6 +195,8 @@ class OperationLog(path: Path) {
   }
 
   def close(): Unit = synchronized {
+    if (!initialized) return

Review Comment:
   When the operation log is not initialized, the close method will throw an 
exception.
   
   ```java
   Caused by: java.nio.file.NoSuchFileException:
   
           at 
org.apache.kyuubi.operation.log.OperationLog.reader$lzycompute(OperationLog.scala:89)
           at 
org.apache.kyuubi.operation.log.OperationLog.reader(OperationLog.scala:89)
           at 
org.apache.kyuubi.operation.log.OperationLog.$anonfun$close$1(OperationLog.scala:201)
           at 
org.apache.kyuubi.operation.log.OperationLog.trySafely(OperationLog.scala:221)
   ```



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