kirktrue commented on code in PR #19917: URL: https://github.com/apache/kafka/pull/19917#discussion_r2152538609
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerRebalanceListenerInvoker.java: ########## @@ -103,11 +114,14 @@ public Exception invokePartitionsRevoked(final SortedSet<TopicPartition> revoked } public Exception invokePartitionsLost(final SortedSet<TopicPartition> lostPartitions) { - log.info("Lost previously assigned partitions {}", lostPartitions.stream().map(TopicPartition::toString).collect(Collectors.joining(", "))); + if (log.isInfoEnabled()) + log.info("Lost previously assigned partitions {}", Utils.topicPartitionString(lostPartitions)); + Set<TopicPartition> lostPausedPartitions = subscriptions.pausedPartitions(); lostPausedPartitions.retainAll(lostPartitions); - if (!lostPausedPartitions.isEmpty()) - log.info("The pause flag in partitions [{}] will be removed due to partition lost.", lostPartitions.stream().map(TopicPartition::toString).collect(Collectors.joining(", "))); + + if (!lostPausedPartitions.isEmpty() && log.isInfoEnabled()) + log.info("The pause flag in partitions [{}] will be removed due to partition lost.", Utils.topicPartitionString(lostPartitions)); Review Comment: Done -- 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