hachikuji commented on a change in pull request #9912:
URL: https://github.com/apache/kafka/pull/9912#discussion_r560389436



##########
File path: core/src/main/scala/kafka/server/RequestHandlerHelper.scala
##########
@@ -58,16 +57,68 @@ object RequestHandlerHelper {
   }
 }
 
+class UnthrottledRequestHandlerHelper(
+  requestChannel: RequestChannel,
+  logPrefix: String
+) extends Logging {
+  this.logIdent = logPrefix
 
+  def handleError(request: RequestChannel.Request, e: Throwable): Unit = {
+    error("Error when handling request: " +
+      s"clientId=${request.header.clientId}, " +
+      s"correlationId=${request.header.correlationId}, " +
+      s"api=${request.header.apiKey}, " +
+      s"version=${request.header.apiVersion}, " +
+      s"body=${request.body[AbstractRequest]}", e)
+    sendErrorOrCloseConnection(request, e, 0)

Review comment:
       There is no state inside `UnthrottledRequestHandlerHelper`, so we could 
pull these methods into the companion I guess. Not sure that's really better, 
but at least it removes the inheritance. Let me see how this looks. 




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to