[
https://issues.apache.org/jira/browse/KAFKA-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425024#comment-13425024
]
Jun Rao commented on KAFKA-376:
-------------------------------
Prashanth,
Thanks for the patch. Some comments:
1. In KafkaApis, currently we allow fetch requests on follower replicas, in
addition to the leader replica. This is potentially useful for debugging
purpose and it would be good to keep this. For normal consumer clients, the
fetch requests will still be routed to the leader. However, for tools like
ConsoleConsumer, we can potentially consume from any replica.
2. SimpleFetchTest:
2.1 Could you add the Apache header and remove the author comment?
2.2 Since you mocked ReplicaManager, could we do the test with just 1 replica?
2.3 Not sure if bigFetch tests anything more than goodFetch in
testNonReplicaSeesHwWhenFetching(). In addition to goodFetch, we should add a
fetchRequest with an offset at HW and expect an empty MessageSet in the
response.
2.4 In testNonReplicaSeesHwWhenFetching(), the second comment of " // there
should be no response" is incorrect.
2.5 For verification, it's probably simpler if we just verify that all log.read
requests made are correct.
Finally, we probably should have kafka-434 committed first since it's a big
patch and has been rebased quite a few times. It's almost there and should be
committed this week.
> 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
> Attachments: KAFKA-376-DRAFT.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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira