AndrewJSchofield commented on code in PR #23171:
URL: https://github.com/apache/kafka/pull/23171#discussion_r3792652706


##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -1565,9 +1565,15 @@ class KafkaApis(val requestChannel: RequestChannel,
     // client is connecting to the correct broker. If both are specified, they 
must match
     // the expected values for this broker.
     def clusterIdOrNodeIdIsInvalid(apiVersionRequest: ApiVersionsRequest): 
Boolean = {
-      apiVersionRequest.version >= 5 &&
+      val invalid = apiVersionRequest.version >= 5 &&
         apiVersionRequest.data.clusterId != null &&
         (apiVersionRequest.data.clusterId != clusterId || 
apiVersionRequest.data.nodeId != brokerId)
+      if (invalid && isTraceEnabled) {
+        trace(s"Rejecting ApiVersionsRequest v${apiVersionRequest.version} 
from ${request.context.connectionId} " +

Review Comment:
   Let's have both.



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