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

optimize ZK access in KafkaController

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.1
    • 0.8.1
    • core
    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment