TaiJuWu opened a new pull request, #24289: URL: https://github.com/apache/kafka/pull/24289
An error in a ShareFetch response, such as TOPIC_AUTHORIZATION_FAILED, is returned immediately and acquires no record, so the share consumer sent the next ShareFetch at once, in a loop, until the application polled. Each error response was buffered and the application polls one at a time, so once the READ ACL was added the consumer kept throwing `TopicAuthorizationException` for hundreds of polls. Like the async consumer, which does not fetch a partition with buffered data, a partition whose buffered error has not been polled is now not fetched. - The partition is removed from the share session, which does not release any acquired record, and is fetched again once the application polls the error. - An error which does not throw, such as NOT_LEADER_OR_FOLLOWER, is polled within the same poll, so the partition is fetched again right away. - Only partitions with a buffered error are skipped, so the acknowledgements sent with ShareFetch are not delayed for the other partitions. `GroupAuthorizerIntegrationTest` gets a test for a share consumer, and one for an async consumer for comparison: the consumer polls a topic without the READ ACL, then the ACL is added, and the consumer must receive the records with at most a few more authorization errors. Without the fix, the share consumer throws hundreds of them. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
