xiarixiaoyao commented on a change in pull request #4962:
URL: https://github.com/apache/hudi/pull/4962#discussion_r825704346
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/utils/TransactionUtils.java
##########
@@ -137,4 +165,20 @@
throw new HoodieIOException("Unable to read metadata for instant " +
hoodieInstantOption.get(), io);
}
}
+
+ /**
+ * Get pending clustering instant.
+ * Notice:
+ * we return .requested instant here.
+ *
+ * @param metaClient
+ * @return
+ */
+ public static List<HoodieInstant>
getPendingReplaceRequestedInstants(HoodieTableMetaClient metaClient) {
+ return metaClient
+ .getActiveTimeline()
+ .filterPendingReplaceTimeline()
+ .getInstants()
+ .map(f ->
HoodieTimeline.getReplaceCommitRequestedInstant(f.getTimestamp())).collect(Collectors.toList());
Review comment:
commits, deltecommits should not have this problem, they will respect
the time order. compaction may have this problem let me think again
--
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]