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

Inconsistent ISR output in topic command when using --bootstrap-server

    XMLWordPrintableJSON

Details

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

    Description

      If there is no leader for a partition, the Metadata API returns an empty ISR. When using the `--bootstrap-server` option with `kafka-topics.sh`, this leads to the following output:

      Topic:foo       PartitionCount:1        ReplicationFactor:2     Configs:segment.bytes=1073741824
              Topic: foo      Partition: 0    Leader: none    Replicas: 1,3   Isr: 
      

      When using `--zookeeper`, we display the current ISR correctly:

      Topic:foo       PartitionCount:1        ReplicationFactor:2     Configs:
              Topic: foo      Partition: 0    Leader: -1      Replicas: 1,3   Isr: 1
      

      To avoid confusion, we should make this output consistent or at least not misleading. We should either change the Metadata API to print the ISR when we have it or we can change the output of the topic command to `N/A` or something like that.

      Attachments

        Issue Links

          Activity

            People

              huxi_2b huxihx
              hachikuji Jason Gustafson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: