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

Fetch request randomly returns 0 bytes when there's still data in the log

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 0.7.2
    • None
    • consumer
    • None
    • centos 6

    Description

      I can't track the bug down in the code, but the behaviour has been hitting us for quite some time (on Kafka 0.7.2): sometimes, a new Simple Consumer object, on a new Fetch Request, returns an empty byte buffer (or a number of bytes considerably smaller than the buffer size), even if there's more data on disk.
      This happens randomly, with no errors, at different offsets in the same topic. Different consumer groups processing the same topic might get stuck at different offsets.
      There seems to be no correlation between empty responses and the offset, or the buffer size, or the log file size. At first we thought it only happened when reaching the end of a log file, before jumping to the next file, but it doesn't seem to be the case. It often happens in the middle of a file.

      Simply retrying the Fetch Request multiple times works quite reliably, after 2 or 3 empty fetches the consumer eventually gets unstuck (we check the size of the queue to see if there's more data before retrying).

      Attachments

        Activity

          People

            nehanarkhede Neha Narkhede
            quipo Lorenzo Alberton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: