Browse Source

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

pull/71/head
Alexey Ozeritskiy 10 years ago committed by Jun Rao
parent
commit
719f2bddd1
  1. 2
      core/src/main/scala/kafka/server/ReplicaFetcherThread.scala

2
core/src/main/scala/kafka/server/ReplicaFetcherThread.scala

@ -111,9 +111,9 @@ class ReplicaFetcherThread(name:String, @@ -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
}
}

Loading…
Cancel
Save