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

ASF GitHub Bot commented on KAFKA-6796:
---------------------------------------

hachikuji opened a new pull request #4883: KAFKA-6796; Fix surprising 
UNKNOWN_TOPIC error from requests to non-replicas
URL: https://github.com/apache/kafka/pull/4883
 
 
   Currently if the client sends a produce request or a fetch request to a 
broker which isn't a replica, we return UNKNOWN_TOPIC_OR_PARTITION. This is a 
bit surprising to see when the topic actually exists. It would be better to 
return NOT_LEADER to avoid confusion. Clients typically handle both errors by 
refreshing metadata and retrying, so changing this should not cause any change 
in behavior on the client. This case can be hit following a partition 
reassignment after the leader is moved and the local replica is deleted.
   
   To validate the current behavior and the fix, I've added  integration tests 
for the fetch and produce APIs.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


> Surprising UNKNOWN_TOPIC error for produce/fetch requests to non-replicas
> -------------------------------------------------------------------------
>
>                 Key: KAFKA-6796
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6796
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 1.0.1
>            Reporter: Jason Gustafson
>            Assignee: Jason Gustafson
>            Priority: Major
>
> Currently if the client sends a produce request or a fetch request to a 
> broker which isn't a replica, we return UNKNOWN_TOPIC_OR_PARTITION. This is a 
> bit surprising to see when the topic actually exists. It would be better to 
> return NOT_LEADER to avoid confusion. Clients typically handle both errors by 
> refreshing metadata and retrying, so changing this should not cause any 
> change in behavior on the client. This case can be hit following a partition 
> reassignment after the leader is moved and the local replica is deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to