nsivabalan commented on code in PR #18380:
URL: https://github.com/apache/hudi/pull/18380#discussion_r3047965122


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/versioning/v1/TimelineArchiverV1.java:
##########
@@ -271,7 +271,30 @@ private Stream<HoodieInstant> getCommitInstantsToArchive() 
throws IOException {
       Option<HoodieInstant> oldestInstantToRetainForClustering =
           
ClusteringUtils.getEarliestInstantToRetainForClustering(table.getActiveTimeline(),
 table.getMetaClient(), config.getCleanerPolicy());
 
+      // If enabled, block archival based on ECTR from the last completed 
clean to ensure we don't archive
+      // commits that have data files that haven't been cleaned yet.
+      Option<HoodieInstant> oldestInstantToRetainForClean = Option.empty();
+      if (config.shouldBlockArchivalOnCleanECTR()) {
+        Option<HoodieInstant> lastCleanInstant = 
table.getCleanTimeline().filterCompletedInstants().lastInstant();

Review Comment:
   clean and rollbacks are separately archived. So, we will def have the last 
clean in active timeline. The empty clean support being added 
https://github.com/apache/hudi/pull/18337 will ensure we always have some clean 
instant in the active timeline. 



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