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

MetadataRequest returns stale list of brokers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 0.9.0.0
    • core
    • None

    Description

      When we issue an metadatarequest towards the cluster, the list of brokers is stale. I mean, even when a broker is down, it's returned back to the client. The following are examples of two invocations one with both brokers online and the second with a broker down:

      {
      "brokers": [

      { "nodeId": 0, "host": "10.139.245.106", "port": 9092, "byteLength": 24 }

      ,

      { "nodeId": 1, "host": "localhost", "port": 9093, "byteLength": 19 }

      ],
      "topicMetadata": [
      {
      "topicErrorCode": 0,
      "topicName": "foozbar",
      "partitions": [

      { "replicas": [ 0 ], "isr": [ 0 ], "partitionErrorCode": 0, "partitionId": 0, "leader": 0, "byteLength": 26 }

      ,

      { "replicas": [ 1 ], "isr": [ 1 ], "partitionErrorCode": 0, "partitionId": 1, "leader": 1, "byteLength": 26 }

      ,

      { "replicas": [ 0 ], "isr": [ 0 ], "partitionErrorCode": 0, "partitionId": 2, "leader": 0, "byteLength": 26 }

      ,

      { "replicas": [ 1 ], "isr": [ 1 ], "partitionErrorCode": 0, "partitionId": 3, "leader": 1, "byteLength": 26 }

      ,

      { "replicas": [ 0 ], "isr": [ 0 ], "partitionErrorCode": 0, "partitionId": 4, "leader": 0, "byteLength": 26 }

      ],
      "byteLength": 145
      }
      ],
      "responseSize": 200,
      "correlationId": -1000
      }

      {
      "brokers": [

      { "nodeId": 0, "host": "10.139.245.106", "port": 9092, "byteLength": 24 }

      ,

      { "nodeId": 1, "host": "localhost", "port": 9093, "byteLength": 19 }

      ],
      "topicMetadata": [
      {
      "topicErrorCode": 0,
      "topicName": "foozbar",
      "partitions": [

      { "replicas": [ 0 ], "isr": [], "partitionErrorCode": 5, "partitionId": 0, "leader": -1, "byteLength": 22 }

      ,

      { "replicas": [ 1 ], "isr": [ 1 ], "partitionErrorCode": 0, "partitionId": 1, "leader": 1, "byteLength": 26 }

      ,

      { "replicas": [ 0 ], "isr": [], "partitionErrorCode": 5, "partitionId": 2, "leader": -1, "byteLength": 22 }

      ,

      { "replicas": [ 1 ], "isr": [ 1 ], "partitionErrorCode": 0, "partitionId": 3, "leader": 1, "byteLength": 26 }

      ,

      { "replicas": [ 0 ], "isr": [], "partitionErrorCode": 5, "partitionId": 4, "leader": -1, "byteLength": 22 }

      ],
      "byteLength": 133
      }
      ],
      "responseSize": 188,
      "correlationId": -1000
      }

      Attachments

        1. BrokerMetadataTest.scala
          4 kB
          Grant Henke
        2. KAFKA-972_2015-06-30_18:42:13.patch
          9 kB
          Ashish Singh
        3. KAFKA-972_2015-07-01_01:36:56.patch
          9 kB
          Ashish Singh
        4. KAFKA-972_2015-07-01_01:42:42.patch
          9 kB
          Ashish Singh
        5. KAFKA-972_2015-07-01_08:06:03.patch
          9 kB
          Ashish Singh
        6. KAFKA-972_2015-07-06_23:07:34.patch
          8 kB
          Ashish Singh
        7. KAFKA-972_2015-07-07_10:42:41.patch
          8 kB
          Ashish Singh
        8. KAFKA-972_2015-07-07_23:24:13.patch
          8 kB
          Ashish Singh
        9. KAFKA-972.patch
          1 kB
          Ashish Singh

        Issue Links

          Activity

            People

              singhashish Ashish Singh
              vccarvalho Vinicius Carvalho
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: