This is an automated email from the ASF dual-hosted git repository. cmccabe pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push: new aff0294 KAFKA-7051: Improve the efficiency of ReplicaManager (fixup) aff0294 is described below commit aff02944fee9dd79e58a6dd31291d5058bc786bb Author: Colin P. Mccabe <cmcc...@confluent.io> AuthorDate: Mon Jan 7 13:21:14 2019 -0800 KAFKA-7051: Improve the efficiency of ReplicaManager (fixup) --- core/src/main/scala/kafka/server/ReplicaManager.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/kafka/server/ReplicaManager.scala b/core/src/main/scala/kafka/server/ReplicaManager.scala index 33c844f..5dfb2e6 100644 --- a/core/src/main/scala/kafka/server/ReplicaManager.scala +++ b/core/src/main/scala/kafka/server/ReplicaManager.scala @@ -854,7 +854,7 @@ class ReplicaManager(val config: KafkaConfig, // construct the fetch results from the read results val fetchPartitionStatus = new mutable.ArrayBuffer[(TopicPartition, FetchPartitionStatus)] fetchInfos.foreach { case (topicPartition, partitionData) => - logReadResultMap.get(topicPartition).map(logReadResult => { + logReadResultMap.get(topicPartition).foreach(logReadResult => { val logOffsetMetadata = logReadResult.info.fetchOffsetMetadata fetchPartitionStatus += (topicPartition -> FetchPartitionStatus(logOffsetMetadata, partitionData)) })