mjsax commented on code in PR #21311:
URL: https://github.com/apache/kafka/pull/21311#discussion_r2699976267
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/topics/InternalTopicManager.java:
##########
@@ -108,8 +114,9 @@ public static ConfiguredTopology configureTopics(LogContext
logContext,
);
} catch (TopicConfigurationException e) {
- log.warn("Topic configuration failed for topology epoch {}: {} ",
- topology.topologyEpoch(), e.toString());
+ long elapsedMs = time.milliseconds() - startTimeMs;
+ log.warn("Topic configuration failed for topology epoch {} in {}
ms: {}",
Review Comment:
```suggestion
log.warn("Topic configuration failed for topology epoch {} in
{}ms: {}",
```
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/topics/InternalTopicManager.java:
##########
@@ -322,4 +329,20 @@ private static Collection<Set<String>>
copartitionGroupsFromPersistedSubtopology
).collect(Collectors.toSet())
).toList();
}
+
+ /**
+ * Formats a collection of topic names for log and exception messages.
+ * Includes up to 5 topic names, and if more are present, appends a
summary.
+ */
+ private static String summarizeTopics(Collection<String> topics) {
+ if (topics == null || topics.isEmpty()) {
+ return "<none>";
+ }
+ int maxToShow = 5;
Review Comment:
Not sure why we are using 5 here, but 3 above for internal topics? Should it
be the same number for both cases?
--
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]