HyunSangHan commented on a change in pull request #11418:
URL: https://github.com/apache/kafka/pull/11418#discussion_r760666349
##########
File path: clients/src/main/java/org/apache/kafka/clients/NetworkClient.java
##########
@@ -1080,8 +1080,13 @@ public void handleSuccessfulResponse(RequestHeader
requestHeader, long now, Meta
.collect(Collectors.toList());
if (!missingListenerPartitions.isEmpty()) {
int count = missingListenerPartitions.size();
- log.warn("{} partitions have leader brokers without a matching
listener, including {}",
- count, missingListenerPartitions.subList(0,
Math.min(10, count)));
+ if (count == 1) {
Review comment:
I think your example will be right if I fix it like below:
```diff
String logStatement = "{} partition" +
(count > 1 ? "s have leader brokers" : " has a leader broker") +
" without a matching listener, " +
- (count > 1 ? "which is " : "including ") + "{}";
+ (count > 1 ? "including " : "which is ") + "{}";
log.warn(logStatement,
count, missingListenerPartitions.subList(0, Math.min(10,
count)));
```
Thank you for your suggestion. :D
--
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]