MartijnVisser commented on code in PR #323:
URL:
https://github.com/apache/flink-connector-kafka/pull/323#discussion_r4351714784
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/dynamic/source/enumerator/DynamicKafkaSourceEnumerator.java:
##########
@@ -907,21 +969,87 @@ private void reassignReportedSplits() {
.map(reportedSplit -> reportedSplit.split)
.collect(Collectors.toList());
splitAssignmentStrategy.onRecoveredSplits(activeSplits,
enumContext.currentParallelism());
+ activeSplits.forEach(split ->
currentSplitOwners.remove(toPartitionKey(split)));
+
+ if (!activeSplits.isEmpty()) {
+ // The initial gate blocks every reader until all reports are
reconciled, so the
+ // reporting reader only controls a deferred flush. Enqueue one
batch per cluster
Review Comment:
Nit: with the gate closed `registeredReaders()` is empty here, so the reader
id does nothing; the flush afterwards covers all readers. I'd say that rather
than "controls a deferred flush".
--
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]