chickenchickenlove commented on code in PR #24250:
URL: https://github.com/apache/kafka/pull/24250#discussion_r4737628903
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStreamsRebalanceListener.java:
##########
@@ -96,6 +96,7 @@ public void onTasksAssigned(final
StreamsRebalanceData.Assignment assignment) {
final StreamsRebalanceData.Assignment runningAssignment =
deduplicateTasks(assignment);
final Map<TaskId, Set<TopicPartition>> activeTasksWithPartitions =
pairWithTopicPartitions(runningAssignment.activeTasks().stream());
+ activeTasksWithPartitions.values().forEach(partitions ->
partitions.retainAll(assignment.assignedPartitions()));
final Map<TaskId, Set<TopicPartition>> standbyTasksWithPartitions =
Review Comment:
@lucasbru
I've added `assignedStandbyPartitions` and `assignedWarmupPartitions` to
`StreamsRebalanceData.Assignment` and used them when
`DefaultStreamsRebalanceListener` calculates `standbyTasksWithPartitions`.
By the way, I found an inconsistency caused by this diff and filed it as
KAFKA-21696. During partial reconciliation, partition counts can increase, and
the change can be applied to active tasks but cannot be applied to standby or
warm-up tasks. However, I think it will only log a warning about the
inconsistency when a standby or warm-up task is promoted to an active task if
its assigned partitions differ from those assigned to the active task.
Please refer to KAFKA-21696!
--
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]