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

Controller has RunningAsBroker instead of RunningAsController state

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.1.0
    • Component/s: None
    • Labels:
      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`. Jun Rao 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

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

              Dates

              • Created:
                Updated:
                Resolved: