majian1998 commented on code in PR #10101:
URL: https://github.com/apache/hudi/pull/10101#discussion_r1396670883


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/HoodieTimelineArchiver.java:
##########
@@ -111,13 +114,13 @@ public boolean archiveIfRequired(HoodieEngineContext 
context, boolean acquireLoc
         };
         this.timelineWriter.write(instantsToArchive, Option.of(action -> 
deleteAnyLeftOverMarkers(context, action)), Option.of(exceptionHandler));
         LOG.info("Deleting archived instants " + instantsToArchive);
-        success = deleteArchivedInstants(instantsToArchive, context);
+        deleteArchivedInstants(instantsToArchive, context);
         // triggers compaction and cleaning only after archiving action
         this.timelineWriter.compactAndClean(context);
       } else {
         LOG.info("No Instants to archive");
       }
-      return success;
+      return instantsToArchive.size();

Review Comment:
   In the current archive code, it seems that `success` is always set to true. 
The `success` variable is initialized as true, and `deleteArchivedInstants` 
always returns true unless it fails. However, if there is a failure, the 
current implementation should throw an exception and terminate without 
returning any value. Therefore, I believe the `success` variable is meaningless 
in the current context. Alternatively, should we catch these exceptions and 
return false? I'm not sure if this would be reasonable.
   



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