[
https://issues.apache.org/jira/browse/KAFKA-21610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18150221#comment-18150221
]
Sean Quah commented on KAFKA-21610:
-----------------------------------
{quote}
Is it OK if I open a PR for this?
{quote}
Yes. Please trigger an assignment run in {{initializeShareGroupState}} too.
> 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)