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

If the producer sends an invalid MessageSet the broker will append it, corrupting the log

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.6
    • None
    • None

    Description

      It appears our producer request handling is actually a little buggy. We allow messagesets to be ragged on the right (i.e. contain a trailing partial message), but when we append() we ultimately do
      messages.writeTo(channel, 0, messages.sizeInBytes)
      which i believe would append not just the valid messages, but also the partial message, thus corrupting the log.

      We need to set limit() on the ByteBuffer to truncate off invalid trailing messages before writing, or something like that.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Anonymous Anonymous
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: