[ 
https://issues.apache.org/jira/browse/KAFKA-6857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Gustafson resolved KAFKA-6857.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.1.1
                   1.0.2
                   2.0.0

> LeaderEpochFileCache.endOffsetFor() should check for UNDEFINED_EPOCH 
> explicitly
> -------------------------------------------------------------------------------
>
>                 Key: KAFKA-6857
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6857
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.11.0.0
>            Reporter: Jun Rao
>            Assignee: Anna Povzner
>            Priority: Major
>             Fix For: 2.0.0, 1.0.2, 1.1.1
>
>
> In LeaderEpochFileCache.endOffsetFor() , we have the following code.
>  
>  
> {code:java}
> if (requestedEpoch == latestEpoch) {
>  leo().messageOffset
> {code}
>  
> In the case when the requestedEpoch is UNDEFINED_EPOCH and latestEpoch is 
> also UNDEFINED_EPOCH, we return leo. This will cause the follower to truncate 
> to a wrong offset. If requestedEpoch is UNDEFINED_EPOCH, we need to request 
> UNDEFINED_EPOCH_OFFSET.



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

Reply via email to