rreddy-22 commented on code in PR #13920:
URL: https://github.com/apache/kafka/pull/13920#discussion_r1259195095


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java:
##########
@@ -194,6 +193,7 @@ private boolean allSubscriptionsEqual(Set<String> allTopics,
                                     otherConsumer, otherMemberGeneration,
                                     tp,
                                     otherMemberGeneration);
+                            allPreviousPartitionsToOwner.put(tp, 
otherConsumer);

Review Comment:
   So in line 161 we directly added the current consumer to the map 
allPreviousPartitionsToOwner. And if we choose to keep that line we should 
remove the put in the first two conditions in lines 175 and 180 and we can keep 
the change you put. 
   However, I feel like this would be redundant since we're replacing the 
otherMember and adding it back if the conditions aren't favorable. My 
suggestion would be to replace line 161 with get instead of put and then keep 
the rest of the code as it is.



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