hachikuji commented on code in PR #13780:
URL: https://github.com/apache/kafka/pull/13780#discussion_r1210611871
##########
metadata/src/main/java/org/apache/kafka/controller/PartitionChangeBuilder.java:
##########
@@ -220,13 +220,15 @@ private boolean isValidNewLeader(int replica) {
private void tryElection(PartitionChangeRecord record) {
ElectionResult electionResult = electLeader();
if (electionResult.node != partition.leader) {
- log.debug(
- "Setting new leader for topicId {}, partition {} to {} using
{} election",
- topicId,
- partitionId,
- electionResult.node,
- electionResult.unclean ? "an unclean" : "a clean"
- );
+ if (log.isTraceEnabled()) {
+ log.trace(
+ "Setting new leader for topicId {}, partition {} to {}
using {} election",
+ topicId,
+ partitionId,
+ electionResult.node,
+ electionResult.unclean ? "an unclean" : "a clean"
Review Comment:
I wonder if it would make sense to log unclean elections at a higher level?
--
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]