TheR1sing3un commented on code in PR #17779:
URL: https://github.com/apache/hudi/pull/17779#discussion_r2670743811
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/versioning/v2/TimelineArchiverV2.java:
##########
@@ -125,6 +123,10 @@ public int archiveIfRequired(HoodieEngineContext context,
boolean acquireLock) t
} else {
log.info("No Instants to archive");
}
+ // run compact and clean if needed even no instants were archived
+ if (!instantsToArchive.isEmpty() || config.isTimelineCompactionForced())
{
Review Comment:
> This could not happen, at most 1 file is generated in each layer, we just
need to merge one bunch of files.
We encountered a scene like this:
1. The instants were written normally, and at this time, archiver was also
called up once normally.
2. archiver archived the active instants.
4. Because instant is archived, a timeline compaction is triggered. However,
timeline compaction failed due to some occasional exception, such as hdfs
timeout, etc.
5. At this point, I re-ran archival, but since there was no instant that
needed to be archve, timelime compaction could never be triggered until there
was an active instant that needed to be archived.
In this case, I do need a logic to forcibly trigger timeline compaction
--
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]