You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/09/20 23:18:16 UTC

[GitHub] [kafka] guozhangwang commented on a change in pull request #9130: KAFKA-10492; Core Kafka Raft Implementation (KIP-595)

guozhangwang commented on a change in pull request #9130:
URL: https://github.com/apache/kafka/pull/9130#discussion_r491745941



##########
File path: clients/src/main/java/org/apache/kafka/common/protocol/ApiKeys.java
##########
@@ -415,4 +444,10 @@ public void visit(Type field) {
         return hasBuffer.get();
     }
 
+    public static Set<ApiKeys> enabledApis() {

Review comment:
       nit: if this is only used for unit tests, better add a one-liner comment for that.

##########
File path: core/src/main/scala/kafka/server/KafkaApis.scala
##########
@@ -182,10 +182,13 @@ class KafkaApis(val requestChannel: RequestChannel,
         case ApiKeys.ALTER_CLIENT_QUOTAS => handleAlterClientQuotasRequest(request)
         case ApiKeys.DESCRIBE_USER_SCRAM_CREDENTIALS => handleDescribeUserScramCredentialsRequest(request)
         case ApiKeys.ALTER_USER_SCRAM_CREDENTIALS => handleAlterUserScramCredentialsRequest(request)
-        case ApiKeys.VOTE => handleVote(request)
-        case ApiKeys.BEGIN_QUORUM_EPOCH => handleBeginEpoch(request)
-        case ApiKeys.END_QUORUM_EPOCH => handleEndEpoch(request)
-        case ApiKeys.DESCRIBE_QUORUM => handleDescribeQuorum(request)
+
+        // Until we are ready to integrate the Raft layer, these APIs are treated as
+        // unexpected and we just close the connection.
+        case ApiKeys.VOTE => closeConnection(request, util.Collections.emptyMap())

Review comment:
       I feel this is not necessary since we would throw in `processCompletedReceives` at SocketServer already as `processChannelException`, but no harm guarding them as well.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org