You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2020/10/20 16:06:46 UTC

[kafka] branch 2.7 updated: MINOR: Check for active controller in UpdateFeatures request processing logic (#9456)

This is an automated email from the ASF dual-hosted git repository.

junrao pushed a commit to branch 2.7
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.7 by this push:
     new 8bebffc  MINOR: Check for active controller in UpdateFeatures request processing logic (#9456)
8bebffc is described below

commit 8bebffc9baae1b763c22e9ccf3f2920ef650bf51
Author: Kowshik Prakasam <kp...@confluent.io>
AuthorDate: Tue Oct 20 09:00:57 2020 -0700

    MINOR: Check for active controller in UpdateFeatures request processing logic (#9456)
    
    Reviewers: Jun Rao <ju...@gmail.com>
---
 core/src/main/scala/kafka/server/KafkaApis.scala | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/core/src/main/scala/kafka/server/KafkaApis.scala b/core/src/main/scala/kafka/server/KafkaApis.scala
index ba8cd08..5b5c9c6 100644
--- a/core/src/main/scala/kafka/server/KafkaApis.scala
+++ b/core/src/main/scala/kafka/server/KafkaApis.scala
@@ -3133,6 +3133,8 @@ class KafkaApis(val requestChannel: RequestChannel,
 
     if (!authorize(request.context, ALTER, CLUSTER, CLUSTER_NAME)) {
       sendResponseCallback(Left(new ApiError(Errors.CLUSTER_AUTHORIZATION_FAILED)))
+    } else if (!controller.isActive) {
+      sendResponseCallback(Left(new ApiError(Errors.NOT_CONTROLLER)))
     } else if (!config.isFeatureVersioningSupported) {
       sendResponseCallback(Left(new ApiError(Errors.INVALID_REQUEST, "Feature versioning system is disabled.")))
     } else {