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

ASF GitHub Bot commented on KAFKA-7771:
---------------------------------------

huxihx commented on pull request #6110: KAFKA-7771:Group/Transaction 
coordinators should update assignment based on current partition count
URL: https://github.com/apache/kafka/pull/6110
 
 
   Whenever a LeaderAndIsr request containing internal topics is received, the 
broker should need to try to update their partition count by recalculating it 
from Zookeeper.
   
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Group/Transaction coordinators should update assignment based on current 
> partition count
> ----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-7771
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7771
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jason Gustafson
>            Assignee: huxihx
>            Priority: Major
>
> In GroupMetadataManager and TransactionStateManager, we cache the number of 
> partitions assigned to __consumer_offsets and __transaction_state 
> respectively. This is used to compute the expected partition for a given 
> group.id or transactional.id. The value is computed only once when the broker 
> starts up and it is based on the number of partitions if the topic exists or 
> the value configured by `offsets.topic.num.partitions` in the case of the 
> group coordinator (or `transaction.state.log.num.partitions` for the 
> transaction coordinator). 
> The problem is that Kafka supports manual creation of these topics as well 
> and the number of partitions doesn't have to match the value configured. If 
> the topic is created with a mismatching number of partitions, then the cached 
> values will not be correct and coordinator lookup may fail.
> To fix this, when brokers receive metadata updates from the controller, they 
> should pass the current number of partitions for these internal topics to the 
> respective coordinators so that the count can be updated. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to