michaldo opened a new pull request, #14720: URL: https://github.com/apache/kafka/pull/14720
ConsumerCoordinator should first call invokePartitionsAssigned and then save the subscription state. Otherwise the following scenario is possible: 1. ConsumerCoordinator is notified that partition P is assigned 2. P is not owned and and treated as addedPartition 3. ConsumerCoordinator saves P as owned 4. ConsumerCoordinator call listener with addedPartition=[P] 5. Listener throws exception 6. ConsumerCoordinator is again that P is assigned 7. P is owned 8. ConsumerCoordinator call listener with empty addedPartition 3 and 4 must be reordered to allow listener fix problem with P *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 to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org