Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Kafka >> mail # dev >> [jira] [Commented] (KAFKA-813) Minor cleanup in Controller

Copy link to this message
[jira] [Commented] (KAFKA-813) Minor cleanup in Controller

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

Jun Rao commented on KAFKA-813:

Thanks for the patch. Some comments:

1. For 1 and 2, it seems that in this patch, we are treating PartitionOfflineException and PartitionUnavailableException the same. Is it better to just pick PartitionOfflineException (and remove PartitionUnavailableException) since it introduces fewer changes?

2. PartiitonStateChange.handleStateChanges(): Is it a good idea to allow leaderSelector to be null? We will have to check and make sure that leaderSelector is null every time we use it.
> Minor cleanup in Controller
> ---------------------------
>                 Key: KAFKA-813
>                 URL: https://issues.apache.org/jira/browse/KAFKA-813
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Swapnil Ghike
>            Assignee: Swapnil Ghike
>             Fix For: 0.8
>         Attachments: kafka-813-v1.patch
> Before starting work on delete topic support, uploading a patch first to address some minor hiccups that touch a bunch of files:
> 1. Change PartitionOfflineException to PartitionUnavailableException because in the partition state machine we mark a partition offline when its leader is down, whereas the PartitionOfflineException is thrown when all the assigned replicas of the partition are down.
> 2. Change PartitionOfflineRate to UnavailablePartitionRate
> 3. Remove default leader selector from partition state machine's handleStateChange. We can specify null as default when we don't need to use a leader selector.
> 4. Include controller info in the client id of LeaderAndIsrRequest.
> 5. Rename controllerContext.allleaders to something more meaningful - partitionLeadershipInfo.
> 6. We don't need to put partition in OnlinePartition state in partition state machine initializeLeaderAndIsrForPartition, the state change occurs in handleStateChange.
> 7. Add todo in handleStateChanges
> 8. Left a comment above ReassignedPartitionLeaderSelector that reassigned replicas are already in the ISR (this is not true for other leader selectors), renamed the vals in the selector.

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

Neha Narkhede 2013-03-19, 19:13
Swapnil Ghike 2013-03-20, 20:17
Neha Narkhede 2013-03-21, 00:41