MehulBatra commented on code in PR #1552:
URL: https://github.com/apache/fluss/pull/1552#discussion_r2292955649


##########
fluss-lake/fluss-lake-iceberg/src/main/java/com/alibaba/fluss/lake/iceberg/tiering/IcebergLakeWriter.java:
##########
@@ -107,6 +161,15 @@ public IcebergWriteResult complete() throws IOException {
     @Override
     public void close() throws IOException {
         try {
+            if (compactionFuture != null && !compactionFuture.isDone()) {
+                compactionFuture.cancel(true);
+            }
+
+            if (compactionExecutor != null) {
+                compactionExecutor.shutdownNow();
+                compactionExecutor.awaitTermination(5, TimeUnit.SECONDS);

Review Comment:
   java.io.IOException: Failed to close IcebergLakeWriter.
        at 
com.alibaba.fluss.lake.iceberg.tiering.IcebergLakeWriter.close(IcebergLakeWriter.java:178)
        at 
com.alibaba.fluss.lake.iceberg.IcebergTieringTest.testTieringWriteTable(IcebergTieringTest.java:170)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
jaorg.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
        at 
java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
        at 
java.base/java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:290)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java)
        at 
java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
        at 
java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
        at 
java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
        at 
java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
   Caused by: java.lang.NullPointerException
        at 
com.alibaba.fluss.lake.iceberg.tiering.IcebergLakeWriter.close(IcebergLakeWriter.java:167)
        ... 117 more



##########
fluss-lake/fluss-lake-iceberg/src/main/java/com/alibaba/fluss/lake/iceberg/tiering/IcebergLakeWriter.java:
##########
@@ -107,6 +161,15 @@ public IcebergWriteResult complete() throws IOException {
     @Override
     public void close() throws IOException {
         try {
+            if (compactionFuture != null && !compactionFuture.isDone()) {
+                compactionFuture.cancel(true);
+            }
+
+            if (compactionExecutor != null) {
+                compactionExecutor.shutdownNow();
+                compactionExecutor.awaitTermination(5, TimeUnit.SECONDS);

Review Comment:
   Reverting back



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