[ 
https://issues.apache.org/jira/browse/KAFKA-2146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14963423#comment-14963423
 ] 

ASF GitHub Bot commented on KAFKA-2146:
---------------------------------------

GitHub user shangan opened a pull request:

    https://github.com/apache/kafka/pull/329

    KAFKA-2146. adding partition did not find the correct startIndex

    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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/shangan/kafka trunk-KAFKA-2146

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/329.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #329
    
----
commit 8937cf75240bf48c1b70c1c2be461c5577dba3ac
Author: chenshangan <chenshan...@meituan.com>
Date:   2015-10-19T13:06:24Z

    KAFKA-2146. adding partition did not find the correct startIndex

----


> adding partition did not find the correct startIndex 
> -----------------------------------------------------
>
>                 Key: KAFKA-2146
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2146
>             Project: Kafka
>          Issue Type: Bug
>          Components: admin
>    Affects Versions: 0.8.2.0
>            Reporter: chenshangan
>            Assignee: chenshangan
>            Priority: Minor
>             Fix For: 0.9.0.0
>
>         Attachments: KAFKA-2146.2.patch, KAFKA-2146.patch
>
>
> 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. 
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to