DL1231 commented on code in PR #19885:
URL: https://github.com/apache/kafka/pull/19885#discussion_r2536014053


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -1124,22 +1123,24 @@ private void onSuccess(final long currentTimeMs,
             var failedRequestRegistered = false;
 
             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();
                 for (var partition : topic.partitions()) {
                     var tp = new TopicPartition(
-                        topic.name(),
+                        topicName,
                         partition.partitionIndex()
                     );
                     var error = Errors.forCode(partition.errorCode());
-                    if (error != Errors.NONE) {
+                    if (error != Errors.NONE || topicName == null) {
                         log.debug("Failed to fetch offset for partition {}: 
{}", tp, error.message());

Review Comment:
   Thanks for pointing this out. I have updated the PR to separate the two 
failure scenarios.
   
   



-- 
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]

Reply via email to