Re: [PR] KAFKA-16277: AbstractStickyAssignor - Sort owned TopicPartitions by p… [kafka]
credpath-seek commented on PR #15416: URL: https://github.com/apache/kafka/pull/15416#issuecomment-1962156726 I was going to try to fix the pipeline issue: ``` [Checks API] No suitable checks publisher found. ``` But then I saw it had been attempted and reverted https://github.com/apache/kafka/pull/15292 -- 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
Re: [PR] KAFKA-16277: AbstractStickyAssignor - Sort owned TopicPartitions by p… [kafka]
credpath-seek commented on PR #15416: URL: https://github.com/apache/kafka/pull/15416#issuecomment-1961101177 Thanks for the review @ableegoldman - I have incorporated your suggested changes -- 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
Re: [PR] KAFKA-16277: AbstractStickyAssignor - Sort owned TopicPartitions by p… [kafka]
credpath-seek commented on code in PR #15416: URL: https://github.com/apache/kafka/pull/15416#discussion_r1500481139 ## 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: I went to do so, but on starting I realised it's a bit of a rabbit hole that I would prefer not to go down. There are multiple other uses of the words "current" and "previous" throughout the class/es and changing this one variable would cause other lines to become more confusing eg ``` log.info("Final assignment of partitions to consumers: \n{}", currentAssignment); ``` -- 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
Re: [PR] KAFKA-16277: AbstractStickyAssignor - Sort owned TopicPartitions by p… [kafka]
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 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
[PR] KAFKA-16277: AbstractStickyAssignor - Sort owned TopicPartitions by p… [kafka]
credpath-seek opened a new pull request, #15416: URL: https://github.com/apache/kafka/pull/15416 ## Context Treats `KAFKA-16277 - CooperativeStickyAssignor does not spread topics evenly among consumer group` https://issues.apache.org/jira/browse/KAFKA-16277 Tests WIP ## Changes - AbstractStickyAssignor - Sort owned TopicPartitions by partition when reassigning - Tests WIP ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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