You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/07 03:43:55 UTC
[GitHub] [kafka] showuon commented on a change in pull request #10645: KAFKA-12464: follow up PR to refactor codes and add logs
showuon commented on a change in pull request #10645:
URL: https://github.com/apache/kafka/pull/10645#discussion_r627903743
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractStickyAssignor.java
##########
@@ -178,17 +178,17 @@ private boolean allSubscriptionsEqual(Set<String> allTopics,
int minQuota = (int) Math.floor(((double) totalPartitionsCount) / numberOfConsumers);
int maxQuota = (int) Math.ceil(((double) totalPartitionsCount) / numberOfConsumers);
- // the expected number of members with maxQuota assignment
- int expectedNumMembersHavingMorePartitions = totalPartitionsCount % numberOfConsumers;
- // the number of members with exactly maxQuota partitions assigned
- int numMembersHavingMorePartitions = 0;
+ // the expected number of members with over minQuota assignment
+ int expectedNumMembersAssignedOverMinQuota = totalPartitionsCount % numberOfConsumers;
+ // the number of members with over minQuota partitions assigned
+ int numMembersAssignedOverMinQuota = 0;
Review comment:
> Just a nit -- and to clarify up front, if you agree with this let's still hold off on doing it here so this PR can finally be merged, as I figure any nits can be addressed in your general assign PR:
> It's still a bit unclear what this value will be sued for when you first see it, maybe we can work in the word minQuota somewhere in the name? Eg expectedNumMembersWithMoreThanMinQuotaPartitions, or for a slightly shorter example numConsumersAssignedOverMinQuota, or something between or similar to those
> FYI I'm also ok with it as-is if you prefer the current name -- just wanted to throw out some other suggestions. I'll trust you to pick whatever name feels right
Make sense! I choose `expectedNumMembersAssignedOverMinQuota` and `numMembersAssignedOverMinQuota`. :)
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org