[ https://issues.apache.org/jira/browse/KAFKA-19396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985624#comment-17985624 ]
Kuan Po Tseng commented on KAFKA-19396: --------------------------------------- I’ve gone through the code and would appreciate any suggestions you might have on this JIRA. Previously, the authorizer filters out unauthorized topics, prepares error responses for them. And the remaining authorized requests then proceed with the {{fetchOffsets}} call. Once the results are obtained, the previously excluded unauthorized topics (with corresponding errors) are merged back into the client response. [https://github.com/apache/kafka/blob/31a7e01769b089ea66883d89c7310663f601f735/core/src/main/scala/kafka/server/KafkaApis.scala#L1167] Now, with the proposed batching approach, the challenge is how to reattach those error topics correctly after the batch fetch completes. Since {{CoordinatorRuntime#scheduleWriteOperation}} sends requests based on the group’s topic partitions to the corresponding coordinator, we need to group batch requests by group’s topic partition first. However, this grouping changes the original order of the requests, making it difficult to align the authorizer-generated errors with their corresponding {{{}OffsetFetchResponseGroup{}}}. One option is to propagate the error topic responses all the way through to the group coordinator, but I feel that may not be ideal in terms of separation of concerns and complexity. Do you have any thoughts or suggestions on how we might handle this more cleanly? c.c. [~dajac] > Use batched version of offset fetch request in new GroupCoordinator interface > ----------------------------------------------------------------------------- > > Key: KAFKA-19396 > URL: https://issues.apache.org/jira/browse/KAFKA-19396 > Project: Kafka > Issue Type: Improvement > Reporter: Rajini Sivaram > Assignee: Kuan Po Tseng > Priority: Major > > Most of the methods in the group coordinator interface use requests that > match the corresponding request in the Kafka protocol. But `fetchOffsets` API > currently takes only a single group from a batched request and is invoked > multiple times when the request is batched. Since the batched version of the > API is used by Admin client, it will be good to optimize request processing > by sending the batched request to the group coordinator instead. For older > versions of the API, we can pass a single group in the batch. -- This message was sent by Atlassian Jira (v8.20.10#820010)