sanghyeok An created KAFKA-21085:
------------------------------------
Summary: Async consumer busy-spins when auto-commit expires during
offset initialization
Key: KAFKA-21085
URL: https://issues.apache.org/jira/browse/KAFKA-21085
Project: Kafka
Issue Type: Bug
Components: clients, consumer
Reporter: sanghyeok An
Assignee: sanghyeok An
AsyncKafkaConsumer.poll() can busy-spin when the auto-commit interval expires
while offset initialization is still waiting for an OffsetFetch response.
The pending initialization keeps the current AsyncPollEvent incomplete,
preventing another AsyncPollEvent from being submitted. With the coordinator
known and no auto-commit in flight, the expired auto-commit timer causes
CommitRequestManager.maximumTimeToWait() to return 0.
Consequently, when no fetch can be returned, pollForFetches() repeatedly calls
FetchBuffer.awaitWakeup() with a zero timeout. The auto-commit check that would
reset the timer is not executed again because no new AsyncPollEvent is
processed.
This exposes a mismatch between wait-time calculation and poll-event
processing: the application thread is repeatedly told not to wait, although it
cannot trigger the auto-commit check again. Other paths may expose a similar
mismatch, but have not yet been
--
This message was sent by Atlassian Jira
(v8.20.10#820010)