danny0405 commented on code in PR #11545: URL: https://github.com/apache/hudi/pull/11545#discussion_r1667211813
########## hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieActiveTimeline.java: ########## @@ -338,18 +339,22 @@ protected void deleteInstantFile(HoodieInstant instant) { * * <p>TODO: [HUDI-6885] Depreciate HoodieActiveTimeline#getInstantFileName and fix related tests. */ - protected String getInstantFileName(HoodieInstant instant) { - if (instant.isCompleted() && instant.getCompletionTime() == null) { - return getInstantsAsStream().filter(s -> s.equals(instant)) - .findFirst().orElseThrow(() -> new HoodieIOException("Cannot find the instant" + instant)) - .getFileName(); + protected String getInstantFileName(HoodieInstant instant, int versionCode) { + if (versionCode < HoodieTableVersion.EIGHT.versionCode()) { Review Comment: It looks like the logic is changed for test code, maybe we should just restrict the logic in the tests either. -- 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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org