hddong commented on a change in pull request #2325:
URL: https://github.com/apache/hudi/pull/2325#discussion_r570082278



##########
File path: 
hudi-cli/src/test/java/org/apache/hudi/cli/commands/TestCommitsCommand.java
##########
@@ -194,7 +194,7 @@ public void testShowArchivedCommits() throws Exception {
     // archived 101 and 102 instants, remove 103 and 104 instant
     data.remove("103");
     data.remove("104");
-    String expected = generateExpectData(3, data);
+    String expected = generateExpectData(1, data);

Review comment:
       > Why do we need to change this?
   
   
https://github.com/apache/hudi/blob/647e9faf255b9ae5796f513d13c769a8c87788d4/hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieArchivedTimeline.java#L133
   
   
https://github.com/apache/hudi/blob/647e9faf255b9ae5796f513d13c769a8c87788d4/hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieInstant.java#L103-L108
   
   `new HoodieInstant(false, action, instantTime)` always return `COMPLETED` 
when State is not `INFLIGHT`, so there is 3 `COMPLETED` records for one 
instanct. Now, use the real state instead, and can get the correct number.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to