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/06/05 06:06:23 UTC

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

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



##########
File path: core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala
##########
@@ -350,7 +372,8 @@ class BrokerToControllerRequestThread(
     } else if (response.wasDisconnected()) {
       updateControllerAddress(null)
       requestQueue.putFirst(queueItem)
-    } else if (response.responseBody().errorCounts().containsKey(Errors.NOT_CONTROLLER)) {
+    } else if (response.responseBody().errorCounts().containsKey(Errors.NOT_CONTROLLER) ||
+      maybeCheckNotControllerErrorInsideEnvelopeResponse(queueItem.requestHeader, response.responseBody())) {

Review comment:
       @showuon Because it's all checking for Not Controller error, can we put the logic for check NotControllerError into the same method? So the else if argument is a little bit cleaner. But this is only a small tip, and it's up to you to decide if you need to do it. This is a great discovery. You have solved my confusion when I met UNKNOWN_SERVER_ERROR. Thank you.




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