the-other-tim-brown commented on code in PR #772:
URL: https://github.com/apache/incubator-xtable/pull/772#discussion_r3368177272
##########
xtable-core/src/main/java/org/apache/xtable/hudi/HudiConversionSource.java:
##########
@@ -249,17 +262,23 @@ private CommitsPair
getCompletedAndPendingCommitsAfterInstant(HoodieInstant comm
if (completedInstants.isEmpty()) {
return CommitsPair.builder().completedCommits(completedInstants).build();
}
- // remove from pending instants that are larger than the last completed
instant.
+ // Remove pending instants that were requested after the last completed
instant finished.
+ // We compare requestedTime of pending instants against completionTime of
the last completed
+ // instant because pending instants don't have a completionTime yet. This
captures pending
+ // commits that were initiated before or during the last completed
commit's execution.
+ HoodieInstant lastCompletedInstant =
completedInstants.get(completedInstants.size() - 1);
Review Comment:
is `completedInstants` ordered by completion time? lets make sure there is a
test to cover that.
--
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]