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

adding partition did not find the correct startIndex

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.0
    • Fix Version/s: 0.10.0.0
    • Component/s: admin
    • Labels:
      None

      Description

      TopicCommand provide a tool to add partitions for existing topics. It try to find the startIndex from existing partitions. There's a minor flaw in this process, it try to use the first partition fetched from zookeeper as the start partition, and use the first replica id in this partition as the startIndex.

      One thing, the first partition fetched from zookeeper is not necessary to be the start partition. As partition id begin from zero, we should use partition with id zero as the start partition.

      The other, broker id does not necessary begin from 0, so the startIndex is not necessary to be the first replica id in the start partition.

        Attachments

        1. KAFKA-2146.patch
          2 kB
          chenshangan
        2. KAFKA-2146.2.patch
          3 kB
          chenshangan

          Activity

            People

            • Assignee:
              chenshangan521@163.com chenshangan
              Reporter:
              chenshangan521@163.com chenshangan
              Reviewer:
              Guozhang Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: