jolshan commented on code in PR #15196:
URL: https://github.com/apache/kafka/pull/15196#discussion_r1467936095


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -1099,29 +1055,48 @@ private static boolean isGroupIdNotEmpty(String 
groupId) {
     }
 
     /**
-     * Handles the exception in the scheduleWriteOperation.
-     * @return The Errors instance associated with the given exception.
+     * This is the handler commonly used by all the operations that requires 
to convert errors to
+     * coordinator errors. The handler also handles and log unexpected errors.
+     *
+     * @param requestName       The name of the request.
+     * @param request           The request itself for logging purposes.
+     * @param exception         The exception to handle.
+     * @param responseBuilder   A function which takes an Errors and a String 
and returns
+     *                          the response. The String can be null.
+     * @return The response.
+     * @param <REQ> The type of the request.

Review Comment:
   hmmm. I see. It is a little confusing to me. If I was trying to add a new 
request/response, it is not clear exactly what needs to be supplied and what to 
get out. But maybe that's something I would need to look in to more and most 
people would understand.
   
   It seems like req is really just used for logging the incoming info when 
there is an error?



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