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

ByteBufferMessageSet.writeTo() should be non-blocking

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.10.0.0
    • Fix Version/s: 0.10.0.1
    • Component/s: None
    • Labels:
      None

      Description

      Currently, in ByteBufferMessageSet.writeTo(), we try to finish writing all bytes in the buffer in a single call. The code has been like that since 0.8. This hasn't been a problem historically since the broker uses zero-copy to send fetch responses and only use ByteBufferMessageSet to send produce responses, which are small. However, in 0.10.0, if a consumer is before 0.10.0, the broker has to down convert the message and use ByteBufferMessageSet to send a fetch response to the consumer. If the client is slow and there are lots of bytes in the ByteBufferMessageSet, we may not be able to completely send all the bytes in the buffer for a long period of time. When this happens, the Processor will be blocked and can't handle other connections, which is bad.

        Attachments

          Activity

            People

            • Assignee:
              ijuma Ismael Juma
              Reporter:
              junrao Jun Rao
              Reviewer:
              Jun Rao

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment