dajac commented on a change in pull request #9850:
URL: https://github.com/apache/kafka/pull/9850#discussion_r555592130



##########
File path: core/src/main/scala/kafka/server/KafkaApis.scala
##########
@@ -3242,6 +3209,133 @@ class KafkaApis(val requestChannel: RequestChannel,
     }
   }
 
+  def handleEnvelope(request: RequestChannel.Request): Unit = {
+    val envelope = request.body[EnvelopeRequest]
+
+    if (!config.metadataQuorumEnabled) {
+      // If forwarding is not yet enabled, we treat the request as unparsable 
and close the connection
+      closeConnection(request, Collections.emptyMap())
+      return
+    } else if (!request.context.fromPrivilegedListener) {
+      sendErrorResponseMaybeThrottle(request, new 
ClusterAuthorizationException(

Review comment:
       IIRC, the intend was to distinguish forwarded requests from 
non-forwarded requests in a prior version of the KIP when we were not using an 
envelope. I don't think that this is really necessary since we use an envelope 
now. At least, I can't think of a strong case for it.




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