You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "codope (via GitHub)" <gi...@apache.org> on 2023/04/13 06:16:00 UTC

[GitHub] [hudi] codope commented on a diff in pull request #8424: [HUDI-6065] Fix deltastreamer shutdown when post write termination strategy enabled

codope commented on code in PR #8424:
URL: https://github.com/apache/hudi/pull/8424#discussion_r1165047701


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/HoodieDeltaStreamer.java:
##########
@@ -742,7 +742,7 @@ protected Pair<CompletableFuture, ExecutorService> startService() {
                   scheduledCompactionInstantAndRDD.isPresent() ? HoodieJavaRDD.of(scheduledCompactionInstantAndRDD.get().getRight()) : null);
               if (requestShutdownIfNeeded(lastWriteStatuses)) {
                 LOG.warn("Closing and shutting down ingestion service");
-                error = true;
+                waitAsyncServicesFinishAndStop();

Review Comment:
   Shouldn't the shutdown in line 747 below take of shutting down async services too?
   cc @nsivabalan 



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/HoodieDeltaStreamer.java:
##########
@@ -764,6 +764,33 @@ protected Pair<CompletableFuture, ExecutorService> startService() {
       }, executor), executor);
     }
 
+    /**
+     * Wait till outstanding pending compaction/clustering
+     */
+    private void waitAsyncServicesFinishAndStop() {

Review Comment:
   Can you please add a test covering this scenario - deltastreamer shutdown with pending compaction or clustering?



-- 
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: commits-unsubscribe@hudi.apache.org

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