You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jason Gustafson (Jira)" <ji...@apache.org> on 2020/12/15 21:09:00 UTC
[jira] [Resolved] (KAFKA-10855) Non-local return in envelope
validation in causes unexpected response send
[ https://issues.apache.org/jira/browse/KAFKA-10855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Gustafson resolved KAFKA-10855.
-------------------------------------
Resolution: Fixed
> Non-local return in envelope validation in causes unexpected response send
> --------------------------------------------------------------------------
>
> Key: KAFKA-10855
> URL: https://issues.apache.org/jira/browse/KAFKA-10855
> Project: Kafka
> Issue Type: Bug
> Reporter: Jason Gustafson
> Assignee: Jason Gustafson
> Priority: Major
>
> `KafkaApis.handle` uses the following logic to validate the envelope:
> ```
> request.envelope.foreach { envelope =>
> if (maybeHandleInvalidEnvelope(envelope, request.header.apiKey)) {
> return
> }
> }
> ```
> Since this is a non-local return, scala raises an exception, which then causes `handleError` to get invoked, which sends an error response.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)