chia7712 commented on code in PR #16042:
URL: https://github.com/apache/kafka/pull/16042#discussion_r1616025501


##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -1258,7 +1258,7 @@ class ReplicaManager(val config: KafkaConfig,
                     .setOffsetLag(getLogEndOffsetLag(log.topicPartition, 
log.logEndOffset, log.isFuture))
                     .setIsFutureKey(log.isFuture)
                 }.toList.asJava)
-            }.toList.asJava
+            }.filterNot(_.partitions().isEmpty).toList.asJava
 
             new 
DescribeLogDirsResponseData.DescribeLogDirsResult().setLogDir(absolutePath)
               .setErrorCode(Errors.NONE.code).setTopics(topicInfos)

Review Comment:
   Another question: Should we call `setTopics(topicInfos)` if `topicInfos` is 
empty?



-- 
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]

Reply via email to