You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/05/12 06:39:42 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #5556: [HUDI-4083] Fix the flink application fails to start due to uncomplet…

danny0405 commented on code in PR #5556:
URL: https://github.com/apache/hudi/pull/5556#discussion_r871000352


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -515,13 +515,25 @@ private Stream<HoodieInstant> getInstantsToArchive() {
   private boolean deleteArchivedInstants(List<HoodieInstant> archivedInstants, HoodieEngineContext context) throws IOException {
     LOG.info("Deleting instants " + archivedInstants);
     boolean success = true;
-    List<String> instantFiles = archivedInstants.stream().map(archivedInstant ->
-        new Path(metaClient.getMetaPath(), archivedInstant.getFileName())

Review Comment:
   The `archivedInstants` seems already been sorted, because the instants from the timeline are already sorted by the instant timestamp and **state**, while in 
   https://github.com/apache/hudi/blob/b10ca7e69f43cf2f14b09d0a610102ab058b1511/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java#L465
   
   we group by the instant pairs but it should still keep sequence for single instant,
   one instant would be sorted by state: requested -> inflight -> complete,
   so in theory, the files are also cleaned in this sequence.
   



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

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