Kafka
  1. Kafka
  2. KAFKA-856

Correlation id for OffsetFetch request (#2) always responds with 0

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.8.1
    • Fix Version/s: 0.8.0
    • Component/s: network
    • Labels:
      None
    • Environment:
      Linux & Mac

      Description

      The in the new Kafka when making an OffsetFetch request the correlation id always response is always sent as 0. It doesn't matter if the client request specifies a correlation id other then 0.

      Example wireshark capture:

      00000000 00 00 00 31 00 07 00 00 00 00 00 2a 00 03 66 6f ...1.... ...*..fo
      00000010 6f 00 0a 74 65 73 74 2d 67 72 6f 75 70 00 00 00 o..test- group...
      00000020 01 00 0a 74 65 73 74 5f 74 6f 70 69 63 00 00 00 ...test_ topic...
      00000030 01 00 00 00 00 .....

      Request #1
      --------
      len: 00 00 00 31
      api: 00 07
      ver: 00 00
      cor: 00 00 00 2a
      cid: 2a 00 03 66 6f 6f
      ....

      00000000 00 00 00 2d 00 00 00 2a 00 03 66 6f 6f 00 00 00 ...-...* ..foo...
      00000010 01 00 0a 74 65 73 74 5f 74 6f 70 69 63 00 00 00 ...test_ topic...
      00000020 01 00 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 ........ ........
      00000030 03

      Response #1
      --------
      len: 00 00 00 2d
      cor: 00 00 00 2a
      cid: 2a 00 03 66 6f 6f
      ....

      00000035 00 00 00 35 00 02 00 00 00 00 00 2a 00 03 66 6f ...5.... ...*..fo
      00000045 6f ff ff ff ff 00 00 00 01 00 0a 74 65 73 74 5f o....... ...test_
      00000055 74 6f 70 69 63 00 00 00 01 00 00 00 00 ff ff ff topic... ........
      00000065 ff ff ff ff fe 00 00 00 01 ........ .

      Request #2
      ---------
      len: 00 00 00 35
      api: 00 02
      ver: 00 00
      cor: 00 00 00 2a
      cid: 00 03 66 6f 6f

      00000031 00 00 00 2a 00 00 00 00 00 00 00 01 00 0a 74 65 ...*.... ......te
      00000041 73 74 5f 74 6f 70 69 63 00 00 00 01 00 00 00 00 st_topic ........
      00000051 00 00 00 00 00 01 00 00 00 00 00 00 00 00 ........ ......

      Response #2:
      ----------
      len: 00 00 00 2a
      cor: 00 00 00 00
      alen: 00 00 00 01
      ....

      1. KAFKA-856.patch
        0.6 kB
        Milosz Tanski

        Issue Links

          Activity

          Hide
          Jun Rao added a comment -

          Thanks for the patch. +1. Committed to 0.8.

          Show
          Jun Rao added a comment - Thanks for the patch. +1. Committed to 0.8.
          Hide
          Colin B. added a comment -

          Kafka-642 was where the correlation id was added to the protocol. However, in the readFrom method the correlation id was not passed to the constructor.

          Show
          Colin B. added a comment - Kafka-642 was where the correlation id was added to the protocol. However, in the readFrom method the correlation id was not passed to the constructor.
          Hide
          Colin B. added a comment -

          This would be nice to have in a 0.8 release, so client writers would not have to special case offsetrequest / offsetresponse not maintaining the correlationid. If this will not make it into 0.8, the protocol doc should be updated to reflect this oddity.

          Show
          Colin B. added a comment - This would be nice to have in a 0.8 release, so client writers would not have to special case offsetrequest / offsetresponse not maintaining the correlationid. If this will not make it into 0.8, the protocol doc should be updated to reflect this oddity.
          Hide
          Milosz Tanski added a comment -

          The mentioned patch.

          Show
          Milosz Tanski added a comment - The mentioned patch.
          Hide
          Milosz Tanski added a comment -

          I have a patch to fix this

          Show
          Milosz Tanski added a comment - I have a patch to fix this

            People

            • Assignee:
              Jun Rao
              Reporter:
              Milosz Tanski
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development