zhaohaidao commented on code in PR #14271: URL: https://github.com/apache/kafka/pull/14271#discussion_r1314218928
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorShard.java: ########## @@ -309,6 +311,21 @@ public CoordinatorResult<OffsetCommitResponseData, Record> commitOffset( return offsetMetadataManager.commitOffset(context, request); } + /** + * Handles a ListGroups request. + * + * @param context The request context. + * @param request The ListGroups request. + * @return A Result containing the ListGroupsResponseData response + */ + public ListGroupsResponseData listGroups( + RequestContext context, + ListGroupsRequestData request, + long committedOffset + ) throws ApiException { Review Comment: I tried to simplify the function signature based on my own understanding. The reason why the function return value here is consistent with the current one is that when an exception is thrown, the final result with an error code can be directly returned. Otherwise, the Runtime exception can only be thrown upward in completeExceptionaly. (a list of ListedGroup cannot pass in an error code). Then when handling the exception, you need to parse the cause of the RuntimeException, which I'm not sure is appropriate. Do you have any suggestions? -- 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