Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-3761

Controller has RunningAsBroker instead of RunningAsController state

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.1.0
    • None
    • None

    Description

      In `KafkaServer.start`, we start `KafkaController`:

      /* start kafka controller */
      kafkaController = new KafkaController(config, zkUtils, brokerState, kafkaMetricsTime, metrics, threadNamePrefix)
      kafkaController.startup()
      

      Which sets the state to `RunningAsController` in `KafkaController.onControllerFailover`:

      `brokerState.newState(RunningAsController)`

      And this later gets set to `RunningAsBroker`.

      This doesn't match the diagram in `BrokerStates`. junrao suggested that we should start the controller after we register the broker in ZK, but this seems tricky as we need to controller in `KafkaApis`.

      Attachments

        Activity

          People

            theduderog Roger Hoover
            ijuma Ismael Juma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: