yuxiqian commented on code in PR #3230: URL: https://github.com/apache/flink-cdc/pull/3230#discussion_r1568608219
########## flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/meta/split/StreamSplit.java: ########## @@ -159,7 +159,15 @@ public String toString() { // ------------------------------------------------------------------- public static StreamSplit appendFinishedSplitInfos( StreamSplit streamSplit, List<FinishedSnapshotSplitInfo> splitInfos) { + // re-calculate the starting changelog offset after the new table added + Offset startingOffset = streamSplit.getStartingOffset(); + for (FinishedSnapshotSplitInfo splitInfo : splitInfos) { + if (splitInfo.getHighWatermark().isBefore(startingOffset)) { + startingOffset = splitInfo.getHighWatermark(); + } + } splitInfos.addAll(streamSplit.getFinishedSnapshotSplitInfos()); + return new StreamSplit( streamSplit.splitId, streamSplit.getStartingOffset(), Review Comment: CMIIW, but seems newly added code just calculated the earliest starting offset into `startingOffset` but didn't really use it to generate new `StreamSplit`. Maybe missed a change here? ```suggestion return new StreamSplit( streamSplit.splitId, startingOffset, ``` -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org