chia7712 commented on code in PR #16042:
URL: https://github.com/apache/kafka/pull/16042#discussion_r2377510526
##########
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:
`setTopics` is executed at line#1264, so I think the check is unnecessary
--
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]