imaffe commented on code in PR #20725:
URL: https://github.com/apache/flink/pull/20725#discussion_r960289906
##########
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/PulsarSourceEnumerator.java:
##########
@@ -114,7 +135,12 @@ public void addSplitsBack(List<PulsarPartitionSplit>
splits, int subtaskId) {
// If the failed subtask has already restarted, we need to assign
pending splits to it.
if (context.registeredReaders().containsKey(subtaskId)) {
- assignPendingPartitionSplits(singletonList(subtaskId));
+ LOG.debug(
+ "Reader {} has been restarted after crashing, we will put
splits back to it.",
+ subtaskId);
+ // Reassign for all readers in case of adding splits after scale
up/down.
+ List<Integer> readers = new
ArrayList<>(context.registeredReaders().keySet());
+ assignPendingPartitionSplits(readers);
Review Comment:
"Reassign for all readers in case of adding splits after scale up/down.",
this sentences occurs to me that the method will be involved in the scale
up/down process. What does this sentence implies ?
--
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]