mjsax commented on code in PR #22991:
URL: https://github.com/apache/kafka/pull/22991#discussion_r3753966771


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStreamsRebalanceListener.java:
##########
@@ -88,10 +91,14 @@ public void onTasksRevoked(final 
Set<StreamsRebalanceData.TaskId> tasks) {
     @Override
     public void onTasksAssigned(final StreamsRebalanceData.Assignment 
assignment) {
         final long start = time.milliseconds();
+        final StreamsRebalanceData.Assignment runningAssignment = 
deduplicateTasks(assignment);
         final Map<TaskId, Set<TopicPartition>> activeTasksWithPartitions =
-            pairWithTopicPartitions(assignment.activeTasks().stream());
+            pairWithTopicPartitions(runningAssignment.activeTasks().stream());
         final Map<TaskId, Set<TopicPartition>> standbyTasksWithPartitions =
-            
pairWithTopicPartitions(Stream.concat(assignment.standbyTasks().stream(), 
assignment.warmupTasks().stream()));
+            pairWithTopicPartitions(Stream.concat(
+                runningAssignment.standbyTasks().stream(),
+                runningAssignment.warmupTasks().stream()
+            ));
 
         log.info("Processing new assignment {} from Streams Rebalance 
Protocol", assignment);

Review Comment:
   Good catch!



-- 
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]

Reply via email to