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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to