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

Jun Rao commented on KAFKA-376:
-------------------------------

Thanks for patch v3. +1 on the patch. The following are some minor comments. 
Once they are addressed, the patch can be checked in without another review.

30. KafkaApis:
30.1 availableFetchBytes(): Not all exceptions are no leader exceptions. So, we 
should log the exception and change the error message to be more general.
30.2 readMessageSets(fetchRequest): The comment about replica id value of -1 
can be removed. There is no need to pass in brokerId for the first 
replicaManager.getReplica call since it defaults to local replica. There is no 
need to make the second replicaManager.getReplica call for the remote replica 
since topic and partitionId are available locally. 
30.3 readMessageSet(): Leader's log should always to be available. If not, we 
should log an error in addition to returning an empty set.

31. SimpleFetchTest: There is no need to mock KafkaZooKeeper any more.

Also, could you create another jira to fix the getOffset api?
                
> expose different data to fetch requests from the follower replicas and 
> consumer clients
> ---------------------------------------------------------------------------------------
>
>                 Key: KAFKA-376
>                 URL: https://issues.apache.org/jira/browse/KAFKA-376
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Prashanth Menon
>              Labels: bugs
>         Attachments: KAFKA-376-DRAFT.patch, KAFKA-376-v1.patch, 
> KAFKA-376-v2.patch, KAFKA-376-v3.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Currently, the broker always uses highwatermark to calculate the available 
> bytes to a fetch request, no matter where the request is from. Instead, we 
> should use highwatermark for requests coming from real consumer clients and 
> use logendoffset for requests coming from follower replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to