ableegoldman commented on a change in pull request #10985:
URL: https://github.com/apache/kafka/pull/10985#discussion_r665029950



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java
##########
@@ -122,6 +131,13 @@ private boolean allSubscriptionsEqual(Set<String> 
allTopics,
                 // If the current member's generation is higher, all the 
previously owned partitions are invalid
                 if (memberData.generation.isPresent() && 
memberData.generation.get() > maxGeneration) {
                     
membersWithOldGeneration.addAll(membersOfCurrentHighestGeneration);
+
+                    allPreviousPartitionsToOwner.clear();
+                    partitionsWithMultiplePreviousOwners.clear();
+                    for (String droppedOutConsumer : membersWithOldGeneration) 
{
+                        
consumerToOwnedPartitions.get(droppedOutConsumer).clear();
+                    }

Review comment:
       This part I just moved here to keep things up to date as we go, before 
we were clearing them after the loop




-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to