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


##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/deltastreamer/TestHoodieDeltaStreamerWithMultiWriter.java:
##########
@@ -404,12 +405,24 @@ private void runJobsInParallel(String tableBasePath, 
HoodieTableType tableType,
        * Need to perform getMessage().contains since the exception coming
        * from {@link 
org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.DeltaSyncService} 
gets wrapped many times into RuntimeExceptions.
        */
-      if (expectConflict && 
e.getCause().getMessage().contains(ConcurrentModificationException.class.getName()))
 {
+      if (expectConflict && backfillFailed.get() && 
e.getCause().getMessage().contains(ConcurrentModificationException.class.getName()))
 {
         // expected ConcurrentModificationException since ingestion & backfill 
will have overlapping writes
-        if (backfillFailed.get()) {
+        if (!continuousFailed.get()) {
           // if backfill job failed, shutdown the continuous job.
           LOG.warn("Calling shutdown on ingestion job since the backfill job 
has failed for " + jobId);
           ingestionJob.shutdownGracefully();
+        } else {
+          // both backfill and ingestion job cannot fail.
+          throw new HoodieException("Both backfilling and ingestion job failed 
", e);
+        }
+      } else if (expectConflict && continuousFailed.get() && 
e.getCause().getMessage().contains("Ingestion service was shut down with 
exception")) {
+        // incase of regular ingestion job failing, 
ConcurrentModificationException is not throw all the way.

Review Comment:
   nit: `thrown`



-- 
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-unsubscr...@hudi.apache.org

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

Reply via email to