You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "A. Sophie Blee-Goldman (Jira)" <ji...@apache.org> on 2021/04/12 19:41:00 UTC

[jira] [Commented] (KAFKA-12654) separate checkAllSubscriptionEqual and getConsumerToOwnedPartitions methods

    [ https://issues.apache.org/jira/browse/KAFKA-12654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17319675#comment-17319675 ] 

A. Sophie Blee-Goldman commented on KAFKA-12654:
------------------------------------------------

To be honest, the sticky assignment algorithm for the general case is so slow that the additional time spent populating this map is probably negligible. That said, the general algorithm ends up populating exactly the same map in #prepopulateCurrentAssignments, so we could just pass it along to the generalAssign as well. But it also has to populate an additional map (prevAssignment) so it would still need to loop over and deserialize this info again anyways

> separate checkAllSubscriptionEqual and getConsumerToOwnedPartitions methods
> ---------------------------------------------------------------------------
>
>                 Key: KAFKA-12654
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12654
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Luke Chen
>            Assignee: Luke Chen
>            Priority: Major
>
> Currently, when entering sticky assignor, we'll check if all consumers have the same subscription to decide which assignor to use (constrained assignor or general assignor). While checking the subscription, we also deserialize the subscription user data to get the partitions owned by the consumer (consumerToOwnedPartitions). However, the consumerToOwnedPartitions info is not used in general assignor (we'll actually deserialize it inside general assignor), so, we don't need to deserialize data for general assignor again. We should separate these 2 things into 2 methods, and only deserialize the user data for constrained assignor, to improve the general sticky assignor performance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)