danny0405 commented on code in PR #10340:
URL: https://github.com/apache/hudi/pull/10340#discussion_r1428645176


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFileReader.java:
##########
@@ -358,12 +361,12 @@ private long scanForNextAvailableBlockOffset() throws 
IOException {
 
   @Override
   public void close() throws IOException {
-    if (!closed) {
+    if (null != shutdownThread) {
+      Runtime.getRuntime().removeShutdownHook(shutdownThread);
+    }
+    if (!closed.getAndSet(true)) {
       this.inputStream.close();
-      if (null != shutdownThread) {
-        Runtime.getRuntime().removeShutdownHook(shutdownThread);

Review Comment:
   The exception seems caused by the triggreing of shutdown hook.



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

Reply via email to