[
https://issues.apache.org/jira/browse/KAFKA-20662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongnuo Lyu updated KAFKA-20662:
--------------------------------
Description:
In https://issues.apache.org/jira/browse/KAFKA-20570 we realized that when the
subscription deserialization fails, we throw an IllegalStateException
{code:java}
private static ConsumerProtocolSubscription deserializeSubscription(
JoinGroupRequestProtocolCollection protocols
) {
try
{ return ConsumerProtocol.deserializeConsumerProtocolSubscription(
ByteBuffer.wrap(protocols.iterator().next().metadata()) ); }
catch (SchemaException e)
{ throw new IllegalStateException("Malformed embedded consumer protocol in
subscription deserialization."); }
}
{code}
which will be translated to UNKNOWN_SERVER_ERROR. This is a bit confusing to
the client. We need to figure out a more appropriate error code for such case
was:
In https://issues.apache.org/jira/browse/KAFKA-20570 we realized that when the
subscription deserialization fails, we throw an IllegalStateException
```
private static ConsumerProtocolSubscription deserializeSubscription(
JoinGroupRequestProtocolCollection protocols
) {
try {
return ConsumerProtocol.deserializeConsumerProtocolSubscription(
ByteBuffer.wrap(protocols.iterator().next().metadata())
);
} catch (SchemaException e) {
throw new IllegalStateException("Malformed embedded consumer protocol in
subscription deserialization.");
}
}
```
which will be translated to UNKNOWN_SERVER_ERROR. This is a bit confusing to
the client. We need to figure out a more appropriate error code for such case
> Proper error code for malformed request during online migration
> ---------------------------------------------------------------
>
> Key: KAFKA-20662
> URL: https://issues.apache.org/jira/browse/KAFKA-20662
> Project: Kafka
> Issue Type: Bug
> Reporter: Dongnuo Lyu
> Assignee: Dongnuo Lyu
> Priority: Major
>
> In https://issues.apache.org/jira/browse/KAFKA-20570 we realized that when
> the subscription deserialization fails, we throw an IllegalStateException
>
> {code:java}
> private static ConsumerProtocolSubscription deserializeSubscription(
> JoinGroupRequestProtocolCollection protocols
> ) {
> try
> { return ConsumerProtocol.deserializeConsumerProtocolSubscription(
> ByteBuffer.wrap(protocols.iterator().next().metadata()) ); }
> catch (SchemaException e)
> { throw new IllegalStateException("Malformed embedded consumer protocol in
> subscription deserialization."); }
> }
> {code}
> which will be translated to UNKNOWN_SERVER_ERROR. This is a bit confusing to
> the client. We need to figure out a more appropriate error code for such case
--
This message was sent by Atlassian Jira
(v8.20.10#820010)