RivenSun2 commented on pull request #11340:
URL: https://github.com/apache/kafka/pull/11340#issuecomment-1001976302


   @showuon 
   Sorry, I analyzed it carefully, because in the 
`ConsumerCoordinator#close(timer)` method, we changed to call 
`maybeAutoCommitOffsetsAsync()`, so the following code block will be executed
   ```
   while (pendingAsyncCommits.get()> 0 && timer.notExpired()) {
                    ensureCoordinatorReady(timer);
                    client.poll(timer);
                    invokeCompletedOffsetCommitCallbacks();
                }
   ```
   But in some testCases of KafkaConsumerTest, Time calls the `new MockTime( )` 
method, which causes `autoTickMs=0`, which in turn causes `Timer#update()` to 
never update currentTimeMs, which leads to blocking in the 
`ConsumerNetworkClient#poll(future, timer)` method.


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