kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: KAFKA-5542; Improve Java doc for LeaderEpochFileCache.endOffsetFor()
Date Fri, 30 Jun 2017 22:01:58 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 49ed16daf -> 9c2de4920


KAFKA-5542; Improve Java doc for LeaderEpochFileCache.endOffsetFor()

Author: Ben Stopford <benstopford@gmail.com>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #3468 from benstopford/KAFKA-5542


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/9c2de492
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/9c2de492
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/9c2de492

Branch: refs/heads/trunk
Commit: 9c2de4920e6035a8fb1d3dd5c6b5a8ccb31c7aa3
Parents: 49ed16d
Author: Ben Stopford <benstopford@gmail.com>
Authored: Fri Jun 30 15:01:53 2017 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Fri Jun 30 15:01:53 2017 -0700

----------------------------------------------------------------------
 .../src/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/9c2de492/core/src/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala b/core/src/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala
index ffca900..c4b5214 100644
--- a/core/src/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala
+++ b/core/src/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala
@@ -86,6 +86,10 @@ class LeaderEpochFileCache(topicPartition: TopicPartition, leo: () =>
LogOffsetM
     * This is defined as the start offset of the first Leader Epoch larger than the
     * Leader Epoch requested, or else the Log End Offset if the latest epoch was requested.
     *
+    * During the upgrade phase, where there are existing messages may not have a leader epoch,
+    * if requestedEpoch is < the first epoch cached, UNSUPPORTED_EPOCH_OFFSET will be
returned
+    * so that the follower falls back to High Water Mark.
+    *
     * @param requestedEpoch
     * @return offset
     */


Mime
View raw message