kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swapnil Ghike (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-813) Minor cleanup in Controller
Date Wed, 20 Mar 2013 20:17:17 GMT

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

Swapnil Ghike commented on KAFKA-813:

A couple of comments/questions before uploading the next patch:

20. Because initializeLeaderAndIsrForPartition() is called at only one place, in handleStateChange().
And handleStateChange() puts the partition in Online state.
21. Ok, renaming to NoReplicaOnlineException.
22. Ok, also please read below.

1.1 I agree that having all the replicas assigned to a partition down is a dangerous situation.
I guess that will be reflected if the OfflinePartitionsCount is non-zero for a while, and
then we can dig into Zk. An OfflinePartitionsCount that remains non-zero for a while could
also indicate another dangerous situation where the replicas are up but leader is not being
assigned. So, i think that clues provided by an OfflinePartitionsCount that remains non-zero
for a few minutes subsume the clues given by UnavailablePartitionsCount, and we may not specifically
need the latter. Thoughts?

2. Argh, yes, thanks.

3. I agree that Controller does not need to know about a useless leader selector. Moving NoOpLeaderSelector
object to partition state machine. 

[~junrao],[~nehanarkhede]: :1.2 I believe the reason was to initialize the gauges when the
controller object is created. However, we can move the gauges to ControllerStats and force
their initialization like server.registerStats(). So perhaps it would be good if we could
decide which jmx beans need to be force-initialized and at which places in the code. Accordingly
I can make the relevant changes. 

> 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
>            Priority: Blocker
>              Labels: kafka-0.8
>             Fix For: 0.8
>         Attachments: kafka-813-v1.patch, kafka-813-v2.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

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

View raw message