danny0405 commented on code in PR #7615:
URL: https://github.com/apache/hudi/pull/7615#discussion_r1091422171
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -282,6 +282,8 @@ protected void commit(HoodieTable table, String
commitActionType, String instant
writeTableMetadata(table, instantTime, commitActionType, metadata);
activeTimeline.saveAsComplete(new HoodieInstant(true, commitActionType,
instantTime),
Option.of(metadata.toJsonString().getBytes(StandardCharsets.UTF_8)));
+ // reload active timeline
+ table.getMetaClient().reloadActiveTimeline();
}
Review Comment:
A better choice is moveing the logic into `HoodieTimelineArchiver`
constructor.
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -282,6 +282,8 @@ protected void commit(HoodieTable table, String
commitActionType, String instant
writeTableMetadata(table, instantTime, commitActionType, metadata);
activeTimeline.saveAsComplete(new HoodieInstant(true, commitActionType,
instantTime),
Option.of(metadata.toJsonString().getBytes(StandardCharsets.UTF_8)));
+ // reload active timeline
+ table.getMetaClient().reloadActiveTimeline();
}
Review Comment:
A better choice is moving the logic into `HoodieTimelineArchiver`
constructor.
--
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]