yihua commented on code in PR #7160:
URL: https://github.com/apache/hudi/pull/7160#discussion_r1018787897
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/IncrSourceHelper.java:
##########
@@ -78,8 +79,20 @@ public static Pair<String, Pair<String, String>>
calculateBeginAndEndInstants(Ja
"Make sure the config
hoodie.deltastreamer.source.hoodieincr.num_instants is set to a positive
value");
HoodieTableMetaClient srcMetaClient =
HoodieTableMetaClient.builder().setConf(jssc.hadoopConfiguration()).setBasePath(srcBasePath).setLoadActiveTimelineOnLoad(true).build();
- final HoodieTimeline activeCommitTimeline =
+ // Find the earliest incomplete commit, deltacommit, or non-clustering
replacecommit,
+ // so that the incremental pulls should be strictly before this instant.
+ // This is to guard around multi-writer scenarios where a commit starting
later than
+ // another commit from a concurrent writer can finish earlier, leaving an
inflight commit
+ // before a completed commit.
+ final Option<HoodieInstant> firstIncompleteCommit =
srcMetaClient.getCommitsTimeline()
Review Comment:
In most cases, we filter out a couple of commits at the end of the Hudi
timeline for multi-writer cases, so there is not much difference. Snapshot
query is more reliable so we can keep using it.
--
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]