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/09/08 00:18:50 UTC

[GitHub] [kafka] ableegoldman commented on a change in pull request #11218: MINOR: optimize performAssignment to skip unnecessary check

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



##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java
##########
@@ -48,6 +53,16 @@
 public class ConsumerConfig extends AbstractConfig {
     private static final ConfigDef CONFIG;
 
+    // a list contains all the in-product assignor names. Should be updated when new assignor added.
+    // This is to help optimize the ConsumerCoordinator#performAssignment
+    public static final List<String> IN_PRODUCT_ASSIGNOR_NAMES =
+        Collections.unmodifiableList(Arrays.asList(
+            RANGE_ASSIGNOR_NAME,
+            ROUNDROBIN_ASSIGNOR_NAME,
+            STICKY_ASSIGNOR_NAME,
+            COOPERATIVE_STICKY_ASSIGNOR_NAME

Review comment:
       No, I think it's correct to leave the Streams assignor out of this. Though I think it technically may not matter at the moment, since the Streams assignor will only assign topics from its own subscription and ignores the subscribed topics of the other members, we may want the flexibility to do something like this in the future.

##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java
##########
@@ -48,6 +53,16 @@
 public class ConsumerConfig extends AbstractConfig {
     private static final ConfigDef CONFIG;
 
+    // a list contains all the in-product assignor names. Should be updated when new assignor added.
+    // This is to help optimize the ConsumerCoordinator#performAssignment
+    public static final List<String> IN_PRODUCT_ASSIGNOR_NAMES =

Review comment:
       nit: this name is a little funky, can we come up with something that describes what this list actually means? The only things I can think of are a bit clunky, but maybe `ASSIGN_FROM_SUBSCRIBED_ASSIGNORS` or `SUBSCRIBED_TOPICS_ASSIGNORS` or whatever sounds good to you 🙂 




-- 
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-unsubscribe@kafka.apache.org

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