m1a2st commented on code in PR #16042:
URL: https://github.com/apache/kafka/pull/16042#discussion_r1618905589
##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -1259,12 +1260,18 @@ class ReplicaManager(val config: KafkaConfig,
.setIsFutureKey(log.isFuture)
}.toList.asJava)
}.filterNot(_.partitions().isEmpty).toList.asJava
-
- createDescribeLogDirsResult(absolutePath, totalBytes, usableBytes,
topicInfos)
case None =>
- createDescribeLogDirsResult(absolutePath, totalBytes, usableBytes,
Collections.emptyList())
+ Collections.emptyList[DescribeLogDirsTopic]()
}
+ val describeLogDirsResult = new
DescribeLogDirsResponseData.DescribeLogDirsResult()
+ .setLogDir(absolutePath)
+ .setErrorCode(Errors.NONE.code)
+ .setTotalBytes(totalBytes).setUsableBytes(usableBytes)
+ if (!topicInfos.isEmpty)
Review Comment:
In `DescribeLogDirsResult` contructor has already been init a empty List, so
If the `topicInfos.isEmpty` I don't need to `setTopics`. I think that is
redundant
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]