dajac commented on code in PR #21253:
URL: https://github.com/apache/kafka/pull/21253#discussion_r2665860645
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -1124,26 +1137,22 @@ private void onSuccess(final long currentTimeMs,
for (var topic : response.topics()) {
// If the topic id is used, the topic name is empty in the
response.
- String topicName = topic.name().isEmpty() ?
metadata.topicNames().get(topic.topicId()) : topic.name();
+ String topicName = topic.name().isEmpty() ?
topicNamesCache.get(topic.topicId()) : topic.name();
Review Comment:
This check may be a bit weak as a request with an empty topic name will
return an empty topic name in the response. It may be better to check the topic
id. It if is non-zero, we can do the lookup. I suppose that we don't have
access to the version used here, isn't it?
--
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]