kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ismael Juma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5322) Resolve AddPartitions response error code inconsistency
Date Thu, 01 Jun 2017 06:02:04 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-5322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16032502#comment-16032502

Ismael Juma commented on KAFKA-5322:

I prefer option 2 as well.

> Resolve AddPartitions response error code inconsistency
> -------------------------------------------------------
>                 Key: KAFKA-5322
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5322
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: clients, core, producer 
>            Reporter: Jason Gustafson
>            Assignee: Jason Gustafson
>            Priority: Blocker
>              Labels: exactly-once
>             Fix For:
> The AddPartitions request does not support partial failures. Either all partitions are
successfully added to the transaction or none of them are. Currently we return a separate
error code for each partition that was added to the transaction, which begs the question of
what error code to return if we have not actually encountered a fatal partition-level error
for some partition. For example, suppose we send AddPartitions with partitions A and B. If
A is not authorized, we will not even attempt to add B to the transaction, but what error
code should we use. The current solution is to only include partition A and its error code
in the response, but this is a little inconsistent with most other request types. Alternatives
that have been proposed:
> 1. Instead of a partition-level error, use one global error. We can add a global error
message to return friendlier details to the user about which partition had a fault. The downside
is that we would have to parse the message contents if we wanted to do any partition-specific
handling. We could not easily fill the set of topics in {{TopicAuthorizationException}} for
> 2. We can add a new error code to indicate that the broker did not even attempt to add
the partition to the transaction. For example: OPERATION_NOT_ATTEMPTED or something like that.

This message was sent by Atlassian JIRA

View raw message