kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r1395861 - /incubator/kafka/branches/0.8/core/src/main/scala/kafka/cluster/Partition.scala
Date Tue, 09 Oct 2012 05:16:27 GMT
Author: junrao
Date: Tue Oct  9 05:16:26 2012
New Revision: 1395861

URL: http://svn.apache.org/viewvc?rev=1395861&view=rev
Log:
Replica.hw should be initialized to the smaller of checkedpointed HW and log end offset; patched
by Yang Ye; reviewed by Jun Rao; KAFKA-539

Modified:
    incubator/kafka/branches/0.8/core/src/main/scala/kafka/cluster/Partition.scala

Modified: incubator/kafka/branches/0.8/core/src/main/scala/kafka/cluster/Partition.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/branches/0.8/core/src/main/scala/kafka/cluster/Partition.scala?rev=1395861&r1=1395860&r2=1395861&view=diff
==============================================================================
--- incubator/kafka/branches/0.8/core/src/main/scala/kafka/cluster/Partition.scala (original)
+++ incubator/kafka/branches/0.8/core/src/main/scala/kafka/cluster/Partition.scala Tue Oct
 9 05:16:26 2012
@@ -69,7 +69,7 @@ class Partition(val topic: String,
         if (isReplicaLocal(replicaId)) {
           val log = logManager.getOrCreateLog(topic, partitionId)
           val localReplica = new Replica(replicaId, this, time,
-            highwaterMarkCheckpoint.read(topic, partitionId), Some(log))
+            highwaterMarkCheckpoint.read(topic, partitionId).min(log.logEndOffset), Some(log))
           addReplicaIfNotExists(localReplica)
         }
         else {



Mime
View raw message