dajac commented on a change in pull request #11246: URL: https://github.com/apache/kafka/pull/11246#discussion_r693852543
########## File path: core/src/main/scala/kafka/server/KafkaServer.scala ########## @@ -594,13 +594,21 @@ class KafkaServer( val clientResponse = NetworkClientUtils.sendAndReceive(networkClient, request, time) val shutdownResponse = clientResponse.responseBody.asInstanceOf[ControlledShutdownResponse] - if (shutdownResponse.error == Errors.NONE && shutdownResponse.data.remainingPartitions.isEmpty) { + if (shutdownResponse.error != Errors.NONE) { + info(s"Controlled shutdown request returned after ${clientResponse.requestLatencyMs}ms " + + s"with error ${shutdownResponse.error}") + } else if (shutdownResponse.data.remainingPartitions.isEmpty) { shutdownSucceeded = true - info("Controlled shutdown succeeded") - } - else { - info(s"Remaining partitions to move: ${shutdownResponse.data.remainingPartitions}") - info(s"Error from controller: ${shutdownResponse.error}") + info("Controlled shutdown request returned successfully " + + s"after ${clientResponse.requestLatencyMs}ms") + } else { + info(s"Controlled shutdown request returned after ${clientResponse.requestLatencyMs}ms " + + s"with ${shutdownResponse.data.remainingPartitions.size} partitions remaining to move") + + if (isDebugEnabled) { + debug(s"Remaining partitions to move during controlled shutdown: " + Review comment: nit: `s` before the string is not required. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org