You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2018/05/03 23:55:00 UTC

[jira] [Created] (KAFKA-6857) LeaderEpochFileCache.endOffsetFor() should check for UNDEFINED_EPOCH explicitly

Jun Rao created KAFKA-6857:
------------------------------

             Summary: 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


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)