Kafka
  1. Kafka
  2. KAFKA-795

Improvements to PreferredReplicaLeaderElection tool

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.2
    • Component/s: None
    • Labels:
      None

      Description

      We can make some improvements to the PreferredReplicaLeaderElection tool:

      1. Terminate the tool if a controller is not up and running. Currently we can run the tool without having any broker running, which is kind of confusing.
      2. Should we delete /admin zookeeper path in PreferredReplicaLeaderElection (and ReassignPartition) tool at the end? Otherwise the next run of the tool complains that a replica election is already in progress.
      3. If there is an error, we can see it in cotroller.log. Should the tool also throw an error?

        Activity

        Hide
        Neha Narkhede added a comment -

        1. That's a good idea
        2. The tool should protect against overwrite of a zookeeper path in progress by the controller. So one strategy could be let the tool throw an error if there is a zookeeper path already created. The controller, on the other hand, should ensure that it deletes that path when it has completed processing it, successfully or unsuccessfully.
        3. This is not possible since there is no way for the tool to know what's in the controller's log. This is something that the admin has to do on his/her own.

        Show
        Neha Narkhede added a comment - 1. That's a good idea 2. The tool should protect against overwrite of a zookeeper path in progress by the controller. So one strategy could be let the tool throw an error if there is a zookeeper path already created. The controller, on the other hand, should ensure that it deletes that path when it has completed processing it, successfully or unsuccessfully. 3. This is not possible since there is no way for the tool to know what's in the controller's log. This is something that the admin has to do on his/her own.
        Hide
        Sriram Subramanian added a comment -

        1. If we are going to run the tool when there are no brokers, that does not seem to be a realistic case. If we still insist on checking this at startup, we should do it for any admin tool.
        2. The tool throws an error that "path already exist" today. This is the right thing to do for multiple reasons
        a. There was some error during the previous run that made the controller not delete the path
        b. The previous run is still in progess
        3. The process is asyn and hence the tool will not be able to do this.

        Even 1. just seems a wasted effort to me. As long as there is atleast one broker, there is going to be a controller.

        Show
        Sriram Subramanian added a comment - 1. If we are going to run the tool when there are no brokers, that does not seem to be a realistic case. If we still insist on checking this at startup, we should do it for any admin tool. 2. The tool throws an error that "path already exist" today. This is the right thing to do for multiple reasons a. There was some error during the previous run that made the controller not delete the path b. The previous run is still in progess 3. The process is asyn and hence the tool will not be able to do this. Even 1. just seems a wasted effort to me. As long as there is atleast one broker, there is going to be a controller.
        Hide
        Jun Rao added a comment -

        Is this a blocker for 0.8? If not, we should fix it in trunk.

        Show
        Jun Rao added a comment - Is this a blocker for 0.8? If not, we should fix it in trunk.

          People

          • Assignee:
            Swapnil Ghike
            Reporter:
            Swapnil Ghike
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development