skaundinya15 commented on a change in pull request #10962:
URL: https://github.com/apache/kafka/pull/10962#discussion_r663419209



##########
File path: 
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchResponse.java
##########
@@ -65,6 +69,8 @@
 
     private final OffsetFetchResponseData data;
     private final Errors error;
+    private final Map<String, Errors> groupLevelErrors = new HashMap<>();
+    private final Map<String, Map<TopicPartition, PartitionData>> 
groupToPartitionData = new HashMap<>();

Review comment:
       We do have it in `data` but it is not easy to query them quickly. 
Putting them in a map makes it faster to query them. Otherwise we would have to 
always parse through all the list of group level errors and partition level 
data in order to get something that is specific to a particular group id. I 
figured it would be more worth it to cache these upon initialization of the 
request in a map so that whenever we want to figure out if a group has a 
specific error or what topic partitions it is trying to fetch offsets for, it 
would be easily returnable. 




-- 
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


Reply via email to