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

optimize ZK access in KafkaController

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.1
    • Fix Version/s: 0.8.1
    • Component/s: core
    • Labels:
      None

      Description

      In KafkaController, we access ZK in the following places. Those accesses are not necessary since we can read from the cache in the controller.

      In onBrokerFailure(deadBrokers: Seq[Int]),
      replicaStateMachine.handleStateChanges(getAllReplicasOnBroker(zkClient, controllerContext.allTopics.toSeq, deadBrokers), OfflineReplica)
      }

      In onBrokerStartup(newBrokers: Seq[Int])
      replicaStateMachine.handleStateChanges(getAllReplicasOnBroker(zkClient, controllerContext.allTopics.toSeq, newBrokers), OnlineReplica)
      }

      In shutdownBroker(),
      getPartitionsAssignedToBroker(zkClient, controllerContext.allTopics.toSeq, id).map {
      }

        Attachments

        1. KAFKA-1202.patch
          26 kB
          Jun Rao

          Activity

            People

            • Assignee:
              junrao Jun Rao
              Reporter:
              junrao Jun Rao
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: