danny0405 commented on code in PR #9898:
URL: https://github.com/apache/hudi/pull/9898#discussion_r1367819628
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/CompletionTimeQueryView.java:
##########
@@ -157,17 +158,23 @@ public Option<String> getCompletionTime(String startTime)
{
if (completionTime != null) {
return Option.of(completionTime);
}
- if (HoodieTimeline.compareTimestamps(startTime, GREATER_THAN,
this.startInstant)) {
+ if (HoodieTimeline.compareTimestamps(startTime, GREATER_THAN_OR_EQUALS,
this.cursorInstant)) {
// the instant is still pending
return Option.empty();
}
// the 'startTime' should be out of the eager loading range, switch to a
lazy loading.
// This operation is resource costly.
- HoodieArchivedTimeline.loadInstants(metaClient,
- new EqualsTimestampFilter(startTime),
- HoodieArchivedTimeline.LoadMode.SLIM,
- r -> true,
- this::readCompletionTime);
+ synchronized (this) {
Review Comment:
No, the lazy loading expects to happen in low frequency and we do not want
to loading redundant instants again and again.
--
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]