squah-confluent commented on code in PR #24327:
URL: https://github.com/apache/kafka/pull/24327#discussion_r4652382674


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -2745,6 +2744,39 @@ private OffsetFetchResponseData.OffsetFetchResponseGroup 
handleOffsetFetchExcept
         };
     }
 
+    /**
+     * This is the handler used by offset commit operations to convert errors 
to coordinator errors.
+     * The handler also handles and logs unexpected errors.
+     *
+     * @param operationName     The name of the operation.
+     * @param request           The request for logging purposes.
+     * @param exception         The exception to handle.
+     * @param handler           A function which takes an Errors and builds 
the response.
+     * @return The response built by the handler.
+     * @param <IN> The type of the request. It must be a toString'able object.
+     * @param <OUT> The type of the response.
+     */
+    private <IN, OUT> OUT handleOffsetCommitException(

Review Comment:
   nit: I was about to complain about the type parameters but I realize they 
are copied from `handleOperationException`, so ignore this comment.
   
   * If we want more descriptive type parameter names, "in" and "out" is still 
a little vague. We could go for `RequestData` and `ResponseData`, which are 
closer to the names of the intended concrete types.
   * and allcaps capitalization is unusual for type parameters
   * and we can optionally add a constraint of `Message` as a hint, but to be 
honest that's not a very helpful hint since lots of things extend `Message`.
   
   



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

Reply via email to