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)