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 2023/01/10 08:48:00 UTC
[GitHub] [hudi] Zouxxyy commented on a diff in pull request #7615: [HUDI-5510] Reload active timeline when getInstantsToArchive
Zouxxyy commented on code in PR #7615:
URL: https://github.com/apache/hudi/pull/7615#discussion_r1065489176
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -479,6 +479,8 @@ private Stream<HoodieInstant> getCommitInstantsToArchive() throws IOException {
}
private Stream<HoodieInstant> getInstantsToArchive() throws IOException {
+ metaClient.reloadActiveTimeline();
+
Review Comment:

After commit finished, the instant in table is not updated (still INFLIGHT), therefore, autoArchiveOnCommit in postCommit will not include the just written instant.
Maybe we can reload it inside the commit, like this:

##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -479,6 +479,8 @@ private Stream<HoodieInstant> getCommitInstantsToArchive() throws IOException {
}
private Stream<HoodieInstant> getInstantsToArchive() throws IOException {
+ metaClient.reloadActiveTimeline();
+
Review Comment:
@danny0405

After commit finished, the instant in table is not updated (still INFLIGHT), therefore, autoArchiveOnCommit in postCommit will not include the just written instant.
Maybe we can reload it inside the commit, like this:

--
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