You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/02 13:20:00 UTC

[jira] [Commented] (KAFKA-6859) Follower should not send OffsetForLeaderEpoch for undefined leader epochs

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

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

stanislavkozlovski opened a new pull request #5320: KAFKA-6859: Do not send LeaderEpochRequest for undefined leader epochs
URL: https://github.com/apache/kafka/pull/5320
 
 
   If a broker or topic has a message format < 0.11, he does not track leader epochs. LeaderEpochRequests for such will always return undefined, making the follower truncate to the highest watermark. Since there is no use to use the network for such cases, don't send a request.
   
   ### Notes
   * I am not sure whether we should even check `brokerConfig.interBrokerProtocolVersion >= KAFKA_0_11_0_IV2`, since log message format is the only thing we care about and as far as I understand it is always defined
   * I am not fond of the subclassing in the tests for mocking the method (and also making it protected) but this was the cleanest solution I could come up with. Other ideas are welcome
   
   ### 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:
users@infra.apache.org


> Follower should not send OffsetForLeaderEpoch for undefined leader epochs
> -------------------------------------------------------------------------
>
>                 Key: KAFKA-6859
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6859
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.11.0.0
>            Reporter: Anna Povzner
>            Priority: Major
>
> This is more of an optimization, rather than correctness.
> Currently, if the follower on inter broker protocol version 0.11 and higher, but on older message format, it does not track leader epochs. However, will still send OffsetForLeaderEpoch request to the leader with undefined epoch which is guaranteed to return undefined offset, so that the follower truncated to high watermark. Another example is a bootstrapping follower that does not have any leader epochs recorded, 
> It is cleaner and more efficient to not send OffsetForLeaderEpoch requests to the follower with undefined leader epochs, since we already know the answer.



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