[ https://issues.apache.org/jira/browse/KAFKA-17731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888295#comment-17888295 ]
Lianet Magrans commented on KAFKA-17731: ---------------------------------------- Back-ported to 3.8: https://github.com/apache/kafka/commit/07c4f4c83647cfa61b184e9f4e81632f561c45d6 > Kafka consumer client sometimes elapses wait time for terminating telemetry > push > -------------------------------------------------------------------------------- > > Key: KAFKA-17731 > URL: https://issues.apache.org/jira/browse/KAFKA-17731 > Project: Kafka > Issue Type: Bug > Components: clients > Affects Versions: 3.7.0, 3.8.0, 3.7.1 > Reporter: Apoorv Mittal > Assignee: Apoorv Mittal > Priority: Blocker > Fix For: 3.7.2, 3.8.1, 3.9.1 > > > ClientTelemetryReporter awaits on the timeout to send terminating telemetry > push but sometimes the wait is elapsed. The condition occurs intermitently > which can affect closing time of the consumer. > > {*}The issue can only be reproduced when consumer is closed just after > creating i.e. instantiated Kafka Consumer and closed it{*}. When consumer is > instantly closed then, then worker thread goes for {{timed_waiting}} state > and expects last telemetry push request, which gets completed by background > thread poll. But as the consumer is instantly closed, the heartbeat thread > can't send the telemetry request, which makes the consumer close to wait for > timeout. > > Debug logs: > > {code:java} > [2024-10-08 18:58:48,223] DEBUG > (org.apache.kafka.common.telemetry.internals.ClientTelemetryReporter) > :224 - Thread - 17 - Initiate close of ClientTelemetryReporter > [2024-10-08 18:58:48,223] DEBUG > (org.apache.kafka.common.telemetry.internals.ClientTelemetryReporter) > :610 - Thread - 17 - initiate close for client telemetry, check if terminal > push required. Timeout 30000 ms. > [2024-10-08 18:58:48,223] DEBUG > (org.apache.kafka.common.telemetry.internals.ClientTelemetryReporter) > :834 - Thread - 17 - Setting telemetry state from PUSH_NEEDED to > TERMINATING_PUSH_NEEDED > [2024-10-08 18:58:48,223] INFO > (org.apache.kafka.common.telemetry.internals.ClientTelemetryReporter) > :632 - Thread - 17 - About to wait 30000 ms. for terminal telemetry push to > be submitted > [2024-10-08 18:59:18,729] INFO > (org.apache.kafka.common.telemetry.internals.ClientTelemetryReporter) > :634 - Thread - 17 - Wait for terminal telemetry push to be submitted has > elapsed; may not have actually sent request > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)