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-2164; ReplicaFetcherThread: suspicious log message on reset offset; patched by Alexey Ozeritski; reviewed by Jun Rao
Date Sat, 13 Jun 2015 01:45:54 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk d31a2c238 -> 719f2bddd


kafka-2164; ReplicaFetcherThread: suspicious log message on reset offset; patched by Alexey
Ozeritski; reviewed by Jun Rao


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

Branch: refs/heads/trunk
Commit: 719f2bddd147d4583a15ee8398bb0edccbbcc3f4
Parents: d31a2c2
Author: Alexey Ozeritskiy <aozeritsky@gmail.com>
Authored: Fri Jun 12 18:45:48 2015 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Fri Jun 12 18:45:48 2015 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/ReplicaFetcherThread.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/719f2bdd/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala b/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
index b31b432..181cbc1 100644
--- a/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
+++ b/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala
@@ -111,9 +111,9 @@ class ReplicaFetcherThread(name:String,
        * Roll out a new log at the follower with the start offset equal to the current leader's
start offset and continue fetching.
        */
       val leaderStartOffset = simpleConsumer.earliestOrLatestOffset(topicAndPartition, OffsetRequest.EarliestTime,
brokerConfig.brokerId)
-      replicaMgr.logManager.truncateFullyAndStartAt(topicAndPartition, leaderStartOffset)
       warn("Replica %d for partition %s reset its fetch offset from %d to current leader
%d's start offset %d"
         .format(brokerConfig.brokerId, topicAndPartition, replica.logEndOffset.messageOffset,
sourceBroker.id, leaderStartOffset))
+      replicaMgr.logManager.truncateFullyAndStartAt(topicAndPartition, leaderStartOffset)
       leaderStartOffset
     }
   }


Mime
View raw message