chickenchickenlove commented on code in PR #24250:
URL: https://github.com/apache/kafka/pull/24250#discussion_r4714503174


##########
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
   
   Ah, you're right. I hadn't considered that case initially, but I see that 
the same issue exists there as well.
   
   I'm planning to have the main consumer resolve the topic/partition 
information for standby and warm tasks as well, and pass it through 
StreamsRebalanceData.Assignment. This would be exactly the same process as what 
we currently do for active tasks. With this change, we would be able to support 
partial reconciliation for active, standby, and warm tasks.
   
   However, I think it would be safer to assume that the main consumer and 
restore consumer may have different metadata. Even if the restore consumer is 
unaware of the topic/partition information resolved by the main consumer, I 
believe it should still be able to subscribe to those partitions without any 
significant issues, as long as they actually exist on the broker.
   
   What do you think?



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