junrao commented on code in PR #14305:
URL: https://github.com/apache/kafka/pull/14305#discussion_r1316404620


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -363,6 +365,20 @@ private CompletableFuture<Map<TopicPartition, 
OffsetAndMetadata>> chainFuture(fi
                 }
             });
         }
+
+        @Override
+        public String toString() {
+            return "OffsetFetchRequestState{" +
+                    "requestedPartitions=" + requestedPartitions +
+                    ", requestedGeneration=" + requestedGeneration +
+                    ", future=" + future +
+                    ", exponentialBackoff=" + exponentialBackoff +
+                    ", lastSentMs=" + lastSentMs +
+                    ", lastReceivedMs=" + lastReceivedMs +
+                    ", numAttempts=" + numAttempts +
+                    ", backoffMs=" + backoffMs +

Review Comment:
   Yes, I was referring to the `toString` method. It seems that every subclass 
of `RequestState` directly gets every field in `RequestState` to build its own 
string. This creates duplicated code and can be a bit error prone.



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

Reply via email to