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

Consumer fetch sessions are evicted too quickly

    XMLWordPrintableJSON

Details

    Description

      In stress testing the new consumer, the new consumer is evicting fetch sessions on the broker much more frequently than expected. There is an ongoing investigation into this behavior, but it appears to stem from a race condition due to the design of the new consumer.

      In the background thread, fetch requests are sent in a near continuous fashion for partitions that are "fetchable." A timing bug appears to cause partitions to be "unfetchable," which then causes them to end up in the "removed" set of partitions. The broker then removes them from the fetch session, which causes the number of remaining partitions for that session to drop below a threshold that allows it to be evicted by another competing session. Within a few milliseconds, though, the partitions become "fetchable" again, and are added to the "added" set of partitions on the next fetch request. This causes thrashing on both the client and broker sides as both are handling a steady stream of evictions, which negatively affects consumption throughput.

      Attachments

        Issue Links

          Activity

            People

              kirktrue Kirk True
              kirktrue Kirk True
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: