Davis-Zhang-Onehouse commented on code in PR #12813:
URL: https://github.com/apache/hudi/pull/12813#discussion_r1966319338
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java:
##########
@@ -802,9 +807,18 @@ private Pair<Option<String>, JavaRDD<WriteStatus>>
writeToSinkAndDoMetaSync(Stri
Option<String> scheduledCompactionInstant = Option.empty();
// write to hudi and fetch result
WriteClientWriteResult writeClientWriteResult = writeToSink(inputBatch,
instantTime, useRowWriter);
- JavaRDD<WriteStatus> writeStatusRDD =
writeClientWriteResult.getWriteStatusRDD();
Map<String, List<String>> partitionToReplacedFileIds =
writeClientWriteResult.getPartitionToReplacedFileIds();
-
+ // writeToSink can upgrade table layout version and commitsTimelineOpt
computed before will use the old layout version.
+ Option<String> commitedInstantTime =
getLatestInstantWithValidCheckpointInfo(Option.of(initializeMetaClient().getActiveTimeline().getCommitsTimeline().filterCompletedInstants()));
Review Comment:
will leave to OSS reviewers to decide if we should limit the reload to only
auto upgrade case or not. Llike tracking if this iteration will need an upgrade
(like what we do in
org.apache.hudi.utilities.streamer.StreamerCheckpointUtils#assertNoCheckpointOverrideDuringUpgradeForHoodieIncSource,
need to track an extra state in DS, it is ugly yet depends on how reviewers
think a good bandit is)
--
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]