DanielLeens commented on code in PR #11271:
URL: https://github.com/apache/seatunnel/pull/11271#discussion_r3812230716
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/reader/IncrementalSourceReader.java:
##########
@@ -146,7 +147,16 @@ public void addSplits(List<SourceSplitBase> splits) {
unfinishedSplits.add(split);
}
} else {
- unfinishedSplits.add(split.asIncrementalSplit());
+ IncrementalSplit incrementalSplit =
+
pruneRestoredIncrementalSplit(split.asIncrementalSplit());
+ if (incrementalSplit.getTableIds().isEmpty()) {
+ log.info(
+ "subtask {} skip restored incremental split {}
because all tables have been removed from current configuration.",
+ subtaskId,
+ incrementalSplit.splitId());
+ } else {
+ unfinishedSplits.add(incrementalSplit);
+ }
Review Comment:
Nice catch — I traced the full restore round-trip
(SourceFlowLifeCycle.restoreState -> RestoredSplitOperation ->
IncrementalSourceEnumerator.addSplitsBack ->
IncrementalSplitAssigner.addSplits/getNext) and can confirm the NPE at
IncrementalSplitAssigner.java:273 (current dev) is reachable exactly the way
you describe. Full write-up with root-cause trace and severity is in my review
below; raised as Issue 1 (High), credited to you.
--
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]