[ 
https://issues.apache.org/jira/browse/KAFKA-830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Neha Narkhede updated KAFKA-830:
--------------------------------

    Attachment: kafka-830-v2.patch

Good catch! However, it doesn't make sense to keep it sequence since by 
definition those ids are unique. As for preferred replica logic, currently it 
is just the smallest replica id . So there are 2 options -

1. Store replica ids in a sorted set
2. For preferred replica, pick the smallest id from a traditional hash set

But in patch v2, I stuck to your suggestion since it is a much smaller change 
for 0.8. Will fix this in 0.8.1
                
> partition replica assignment map in the controller should be a Set
> ------------------------------------------------------------------
>
>                 Key: KAFKA-830
>                 URL: https://issues.apache.org/jira/browse/KAFKA-830
>             Project: Kafka
>          Issue Type: Bug
>          Components: controller
>            Reporter: Neha Narkhede
>            Assignee: Neha Narkhede
>            Priority: Blocker
>              Labels: kafka-0.8, p1
>             Fix For: 0.8
>
>         Attachments: kafka-830-v1.patch, kafka-830-v2.patch
>
>
> partitionReplicaAssignment currently stores the list of assigned replicas as 
> a sequence. When a broker comes online, the replica state machine adds the 
> broker to the list of assigned replicas. It should do that only if the 
> replica is already not in the list of assigned replicas. This causes the 
> replication factor to be incorrectly calculated

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to