You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/12/17 00:25:47 UTC
[GitHub] [hudi] nsivabalan commented on a change in pull request #4336: [HUDI-3032] Do not clean the log files right after compaction for met…
nsivabalan commented on a change in pull request #4336:
URL: https://github.com/apache/hudi/pull/4336#discussion_r770912961
##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
##########
@@ -706,7 +706,20 @@ protected void compactIfNecessary(AbstractHoodieWriteClient writeClient, String
}
}
- protected void doClean(AbstractHoodieWriteClient writeClient, String instantTime) {
+ protected void cleanIfNecessary(AbstractHoodieWriteClient writeClient, String instantTime) {
+ Option<HoodieInstant> lastCompletedCompactionInstant = metadataMetaClient.reloadActiveTimeline()
+ .getCommitTimeline().filterCompletedInstants().lastInstant();
+ if (lastCompletedCompactionInstant.isPresent()
+ && metadataMetaClient.getActiveTimeline().filterCompletedInstants()
+ .findInstantsAfter(lastCompletedCompactionInstant.get().getTimestamp()).countInstants() < 3) {
+ // do not clean the log files immediately after compaction to give some buffer time for metadata table reader,
Review comment:
this can happen only if cleaner is very aggressive right? i.e. retain just 1 commit. for older file slices, we should not encounter this. correct me if I am wrong.
--
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-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org