minor fix for KAFKA-1152; ReplicaManager's handling of the leaderAndIsrRequest should gracefully handle leader == -1; patched by Swapnil Ghike; reviewed by Jun Rao

This commit is contained in:
Swapnil Ghike 2013-12-03 16:50:18 -08:00 committed by Jun Rao
parent ea3961fc84
commit 6c36beef87
1 changed files with 4 additions and 4 deletions

View File

@ -365,10 +365,10 @@ class ReplicaManager(val config: KafkaConfig,
partitionAndOffsets.put(new TopicAndPartition(partition),
BrokerAndInitialOffset(leaderBroker, partition.getReplica().get.logEndOffset))
case None =>
stateChangeLogger.trace("Broker %d ignored the become-follower state change with correlation id %d " +
"controller %d epoch %d for topic-partition %s since the designated leader %d " +
"cannot be found in live or shutting down brokers %s"
.format(localBrokerId, correlationId, controllerId, epoch, partition, leader, leaders))
stateChangeLogger.trace(("Broker %d ignored the become-follower state change with correlation id %d " +
"controller %d epoch %d for topic-partition %s since the designated leader %d " +
"cannot be found in live or shutting down brokers %s")
.format(localBrokerId, correlationId, controllerId, epoch, partition, leader, leaders))
}
}
replicaFetcherManager.addFetcherForPartitions(partitionAndOffsets)