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

Sean Quah commented on KAFKA-21610:
-----------------------------------

{quote}
2. What happens if we are initializing 100 partitions and the initializations 
come in slowly over time?
{quote}
This can't happen. On the first heartbeat, the group coordinator tells the 
share coordinator to initialize all partitions. 
`DefaultStatePersister.initializeState` waits until all partitions have been 
initialized then `initializeShareGroupState` is called with all partitions.



> Consider scheduling the share group assignor when share partitions are 
> initialized
> ----------------------------------------------------------------------------------
>
>                 Key: KAFKA-21610
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21610
>             Project: Kafka
>          Issue Type: Improvement
>          Components: group-coordinator
>    Affects Versions: 4.5.0
>            Reporter: Sean Quah
>            Assignee: 이선민
>            Priority: Major
>
> With assignor offloading on, a new share group's first assignor run is 
> scheduled before its share partitions are initialized, so that run assigns 
> nothing. The partitions are only assigned after the next heartbeat bumps the 
> group epoch and a second run completes. That costs members an extra heartbeat 
> (see ShareConsumerCallbackTest.testAcknowledgementSentOnSubscriptionChange).
> Bump the group epoch and schedule the assignor run in 
> initializeShareGroupState instead, so the second heartbeat already receives 
> the assignment.
> https://github.com/apache/kafka/pull/24319 will add a test scenario for this. 
> Please wait until that PR has been merged before starting this work.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to