ableegoldman commented on code in PR #15416:
URL: https://github.com/apache/kafka/pull/15416#discussion_r1500214172


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java:
##########
@@ -663,6 +663,7 @@ private void assignOwnedPartitions() {
                 String consumer = consumerEntry.getKey();

Review Comment:
   Not  necessarily related to this fix, but while you're here: would you mind 
helping with the readability of this class by renaming the `currentAssignment` 
field to `previousAssignment`? Took me a few minutes to understand what was 
going on until I realized this map just had a misleading name



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java:
##########
@@ -663,6 +663,7 @@ private void assignOwnedPartitions() {
                 String consumer = consumerEntry.getKey();
                 List<TopicPartition> ownedPartitions = 
consumerEntry.getValue().stream()
                         .filter(tp -> !rackInfo.racksMismatch(consumer, tp))
+                        
.sorted(Comparator.comparing(TopicPartition::partition))

Review Comment:
   ```suggestion
                           
.sorted(Comparator.comparing(TopicPartition::partition).thenComparing(TopicPartition::topic))
   ```



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