nsivabalan commented on a change in pull request #4824:
URL: https://github.com/apache/hudi/pull/4824#discussion_r808554033



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/async/HoodieAsyncService.java
##########
@@ -109,6 +116,7 @@ public void waitForShutdown() throws ExecutionException, 
InterruptedException {
   public void shutdown(boolean force) {
     if (!shutdownRequested || force) {
       shutdownRequested = true;
+      shutdown = true;

Review comment:
       I don't see much value in "shutdown" variable. we might as well use 
"shutdownRequested" wherever we want to check for value of "shutdown" since 
both are set to true here. 
   

##########
File path: 
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/HoodieDeltaStreamer.java
##########
@@ -659,13 +659,20 @@ public DeltaSync getDeltaSync() {
                 
asyncCompactService.get().enqueuePendingAsyncServiceInstant(new 
HoodieInstant(State.REQUESTED,
                     HoodieTimeline.COMPACTION_ACTION, 
scheduledCompactionInstantAndRDD.get().getLeft().get()));
                 
asyncCompactService.get().waitTillPendingAsyncServiceInstantsReducesTo(cfg.maxPendingCompactions);
+                if (asyncCompactService.get().hasError()) {
+                  throw new HoodieException("Async compaction failed.  
Shutting down Delta Sync...");
+                }
               }
               if (clusteringConfig.isAsyncClusteringEnabled()) {
                 Option<String> clusteringInstant = 
deltaSync.getClusteringInstantOpt();
                 if (clusteringInstant.isPresent()) {
                   LOG.info("Scheduled async clustering for instant: " + 
clusteringInstant.get());
                   
asyncClusteringService.get().enqueuePendingAsyncServiceInstant(new 
HoodieInstant(State.REQUESTED, HoodieTimeline.REPLACE_COMMIT_ACTION, 
clusteringInstant.get()));
                   
asyncClusteringService.get().waitTillPendingAsyncServiceInstantsReducesTo(cfg.maxPendingClustering);
+                  if (asyncClusteringService.get().hasError()) {
+                    error = true;

Review comment:
       yes. why we don't we set in L662 




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