Kafka
  1. Kafka
  2. KAFKA-707

Improve error message in the producer when sending data to a partition without an active leader

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: None
    • Component/s: producer
    • Labels:
      None

      Description

      We log a very cryptic message when the producer tries to send data to a partition that doesn't have a leader at that moment -

      Failed to send to broker -1 with data Map([PageViewEventByGroupJson,8]

      Let's improve this to log a better error message

      1. kafka-707.patch
        0.9 kB
        Neha Narkhede

        Activity

        Hide
        Neha Narkhede added a comment -

        Thank you for the review

        Show
        Neha Narkhede added a comment - Thank you for the review
        Hide
        Jun Rao added a comment -

        +1 for the patch.

        Show
        Jun Rao added a comment - +1 for the patch.
        Hide
        Neha Narkhede added a comment -

        [2013-01-17 21:41:19,151] WARN Failed to send data List(ByteBufferMessageSet(MessageAndOffset(Message(magic = 0, attributes = 0, crc = 2829517411, key = null, payload = java.nio.HeapByteBuffer[pos=0 lim=100 cap=100]),0) since partitions [test3,0],[test2,0],[test1,0],[test5,0],[test4,0] don't have a leader (kafka.producer.async.DefaultEventHandler)

        Show
        Neha Narkhede added a comment - [2013-01-17 21:41:19,151] WARN Failed to send data List(ByteBufferMessageSet(MessageAndOffset(Message(magic = 0, attributes = 0, crc = 2829517411, key = null, payload = java.nio.HeapByteBuffer [pos=0 lim=100 cap=100] ),0) since partitions [test3,0] , [test2,0] , [test1,0] , [test5,0] , [test4,0] don't have a leader (kafka.producer.async.DefaultEventHandler)
        Hide
        Jay Kreps added a comment -

        What is the resulting error the user will see in this case?

        Show
        Jay Kreps added a comment - What is the resulting error the user will see in this case?
        Hide
        Neha Narkhede added a comment -

        Minor patch to fix the error message in the producer

        Show
        Neha Narkhede added a comment - Minor patch to fix the error message in the producer

          People

          • Assignee:
            Neha Narkhede
            Reporter:
            Neha Narkhede
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development