lnbest0707 commented on code in PR #283:
URL:
https://github.com/apache/flink-connector-kafka/pull/283#discussion_r3546167675
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/dynamic/source/reader/DynamicKafkaSourceReader.java:
##########
@@ -405,11 +405,18 @@ private void releasePendingSplitOutputs(ReaderOutput<T>
readerOutput) {
}
for (String splitId : pendingSplitOutputReleases) {
- readerOutput.releaseOutputForSplit(splitId);
+ markSplitIdleAndReleaseOutput(readerOutput, splitId);
}
pendingSplitOutputReleases.clear();
}
+ private void markSplitIdleAndReleaseOutput(ReaderOutput<T> readerOutput,
String splitId) {
+ // Unregistering a split output does not recompute Flink's split-local
watermark or
+ // idleness. Mark it idle first so a removed split cannot keep the
source output active.
+ readerOutput.createOutputForSplit(splitId).markIdle();
Review Comment:
good catch! Added a fix with a test to catch 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]