m1a2st opened a new pull request, #23227: URL: https://github.com/apache/kafka/pull/23227
`CommitRequestManager#maximumTimeToWait()` returned the raw remaining time of the auto-commit timer, which becomes `0` once the interval elapses. However, `poll()` cannot actually send an auto-commit until the coordinator is known; it returns `EMPTY` while `coordinatorRequestManager.coordinator()` is empty. When bootstrap DNS resolution is still in progress (`bootstrap.resolve.timeout.ms > 0`) and `auto.commit.interval.ms` is shorter than the resolution window, the auto-commit timer can expire before the coordinator is discovered. `remainingMs()` then continues to return `0` indefinitely, since the timer is not reset until the application thread successfully sends an auto-commit. This `0` is propagated to `ConsumerNetworkThread#cachedMaximumTimeToWait`, which bounds the `pollTimeout` in `AsyncKafkaConsumer#pollForFetches()` to `0`, causing the application and network threads to busy-loop for as long as the coordinator remains unknown. -- 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]
