Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-17731

Kafka consumer client sometimes elapses wait time for terminating telemetry push

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 3.7.0, 3.8.0, 3.7.1
    • 3.9.0, 3.7.2, 3.8.1
    • clients, consumer
    • None

    Description

      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:

       

      [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 
      
      
      

      Attachments

        Issue Links

          Activity

            People

              apoorvmittal10 Apoorv Mittal
              apoorvmittal10 Apoorv Mittal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: