guozhangwang commented on code in PR #13380:
URL: https://github.com/apache/kafka/pull/13380#discussion_r1146963166


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -137,31 +166,21 @@ CompletableFuture<ClientResponse> sendAutoCommit(final 
Map<TopicPartition, Offse
                     }
                     return null;
                 });
-        return future;
-    }
-
-    public void clientPoll(final long currentTimeMs) {
-        this.autoCommitState.ifPresent(t -> t.ack(currentTimeMs));
     }
 
-    // Visible for testing
-    Queue<StagedCommit> stagedCommits() {
-        return this.stagedCommits;
-    }
 
-    private class StagedCommit {
+    private class UnsentOffsetCommitRequest {
         private final Map<TopicPartition, OffsetAndMetadata> offsets;
         private final String groupId;
         private final GroupState.Generation generation;
         private final String groupInstanceId;
         private final NetworkClientDelegate.FutureCompletionHandler future;
 
-        public StagedCommit(final Map<TopicPartition, OffsetAndMetadata> 
offsets,
-                            final String groupId,
-                            final String groupInstanceId,
-                            final GroupState.Generation generation) {
+        public UnsentOffsetCommitRequest(final Map<TopicPartition, 
OffsetAndMetadata> offsets,
+                                         final String groupId,
+                                         final String groupInstanceId,
+                                         final GroupState.Generation 
generation) {
             this.offsets = offsets;
-            // if no callback is provided, DefaultOffsetCommitCallback will be 
used.

Review Comment:
   I do not think we do: in case `commitAync()` is called we just passed in 
`null` as the cb. In that case we would actually have an NPE when triggering:
   
   ```
   callback.onComplete(offsets, new RuntimeException(t));
   ```
   
   right?



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