You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/31 12:44:46 UTC

[GitHub] [kafka] showuon commented on a change in pull request #10794: KAFKA-12677: parse envelope response to check if not_controller error existed

showuon commented on a change in pull request #10794:
URL: https://github.com/apache/kafka/pull/10794#discussion_r642461619



##########
File path: core/src/main/scala/kafka/server/AutoTopicCreationManager.scala
##########
@@ -198,15 +199,15 @@ class DefaultAutoTopicCreationManager(
 
       // Borrow client information such as client id and correlation id from the original request,
       // in order to correlate the create request with the original metadata request.
-      val requestHeader = new RequestHeader(ApiKeys.CREATE_TOPICS,
+      requestHeader = new RequestHeader(ApiKeys.CREATE_TOPICS,
         requestVersion,
         context.clientId,
         context.correlationId)
       ForwardingManager.buildEnvelopeRequest(context,
         createTopicsRequest.build(requestVersion).serializeWithHeader(requestHeader))
     }.getOrElse(createTopicsRequest)
 
-    channelManager.sendRequest(request, requestCompletionHandler)
+    channelManager.sendRequest(request, requestCompletionHandler, requestHeader)

Review comment:
       This is 1 of 2 places we use `EnvelopeRequest`, so add `requestHeader`




-- 
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:
users@infra.apache.org