Kuan Po Tseng created KAFKA-21286:
-------------------------------------

             Summary: Share consumer may delay fatal startup errors while 
waiting for the first heartbeat
                 Key: KAFKA-21286
                 URL: https://issues.apache.org/jira/browse/KAFKA-21286
             Project: Kafka
          Issue Type: Bug
          Components: clients
            Reporter: Kuan Po Tseng
            Assignee: Kuan Po Tseng


KAFKA-19804 initializes the heartbeat interval to request.timeout.ms to prevent 
busy polling while the first heartbeat is in flight. However, this can delay 
fatal error reporting in the share consumer.

ShareConsumerImpl.pollForFetches() waits for up to the minimum of 
maximumTimeToWait() and the remaining poll timeout. If the first heartbeat 
returns a fatal error, such as GROUP_AUTHORIZATION_FAILED, the network thread 
enqueues an error event, but BackgroundEventHandler does not wake the fetch 
buffer. The application thread processes the error only after its current 
fetch-buffer wait finishes.

With the default request.timeout.ms and a sufficiently long poll timeout, this 
can delay reporting an already received error by approximately 30 seconds.

AsyncKafkaConsumer already caps the fetch-buffer wait at retryBackoffMs when no 
partitions are assigned. The share consumer has no equivalent cap.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to