danny0405 commented on a change in pull request #4016:
URL: https://github.com/apache/hudi/pull/4016#discussion_r776562829
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieActiveTimeline.java
##########
@@ -190,12 +190,36 @@ public static void deleteInstantFile(FileSystem fs,
String metaPath, HoodieInsta
}
}
+ public void deleteEmptyInstantIfExists(HoodieInstant instant) {
+ ValidationUtils.checkArgument(isEmpty(instant));
+ deleteInstantFileIfExists(instant);
+ }
+
public void deleteCompactionRequested(HoodieInstant instant) {
ValidationUtils.checkArgument(instant.isRequested());
ValidationUtils.checkArgument(Objects.equals(instant.getAction(),
HoodieTimeline.COMPACTION_ACTION));
deleteInstantFile(instant);
}
+ private void deleteInstantFileIfExists(HoodieInstant instant) {
+ LOG.info("Deleting instant " + instant);
+ Path inFlightCommitFilePath = new Path(metaClient.getMetaPath(),
instant.getFileName());
+ try {
Review comment:
nit: the deleted instant may or may not in inflight state from the usage
!
--
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]