vinothchandar commented on code in PR #13216:
URL: https://github.com/apache/hudi/pull/13216#discussion_r2176298019


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/versioning/v2/TimelineArchiverV2.java:
##########
@@ -117,6 +118,11 @@ public int archiveIfRequired(HoodieEngineContext context, 
boolean acquireLock) t
         deleteArchivedActions(instantsToArchive, context);
         // triggers compaction and cleaning only after archiving action
         this.timelineWriter.compactAndClean(context);
+        List<HoodieInstant> archivedInstants = instantsToArchive.stream()
+            .map(action -> 
Stream.concat(action.getCompletedInstants().stream(), 
action.getPendingInstants().stream()).collect(Collectors.toList()))
+            .flatMap(Collection::stream).collect(Collectors.toList());
+        // Call Table Format archive to allow archiving in table format.
+        table.getMetaClient().getTableFormat().archive(archivedInstants, 
table.getContext(), table.getMetaClient(), table.getViewManager());

Review Comment:
   I don't prefer any `if` checks across the code base.. 



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