xiarixiaoyao commented on a change in pull request #4962:
URL: https://github.com/apache/hudi/pull/4962#discussion_r836001123



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/utils/TransactionUtils.java
##########
@@ -137,4 +126,27 @@
       throw new HoodieIOException("Unable to read metadata for instant " + 
hoodieInstantOption.get(), io);
     }
   }
-}
\ No newline at end of file
+
+  /**
+   * Get pending instant.
+   *
+   * @param metaClient
+   * @return
+   */
+  public static Set<String> getInflightInstants(HoodieTableMetaClient 
metaClient) {
+    // collect pending deltaCommit/commit/compaction/clustering
+    return metaClient
+            .getActiveTimeline()
+            
.filterInflights().getInstants().map(HoodieInstant::getTimestamp).collect(Collectors.toSet());

Review comment:
       i agree with suryaprasanna, we should include requested instants
   If it is an ordinary commit(General write operation), this place does not 
need to be considered since we will deal it  later, but if it is a commit of 
competition or clustering, this place must be considered.
   
   let‘s me fixed it, and add UT for it




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