MINOR: Remove unnecessary check in ReplicaManager (#20588)

`setTopics` is executed at before, so the check is unnecessary.

Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
 <chia7712@gmail.com>
This commit is contained in:
Lan Ding 2025-09-25 23:52:46 +08:00 committed by GitHub
parent 97c8c6b595
commit f4e00e9cf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -1261,11 +1261,11 @@ class ReplicaManager(val config: KafkaConfig,
}
val describeLogDirsResult = new DescribeLogDirsResponseData.DescribeLogDirsResult()
.setLogDir(absolutePath).setTopics(topicInfos)
.setLogDir(absolutePath)
.setTopics(topicInfos)
.setErrorCode(Errors.NONE.code)
.setTotalBytes(totalBytes).setUsableBytes(usableBytes)
if (!topicInfos.isEmpty)
describeLogDirsResult.setTopics(topicInfos)
.setTotalBytes(totalBytes)
.setUsableBytes(usableBytes)
describeLogDirsResult
} catch {