jsancio commented on code in PR #15231:
URL: https://github.com/apache/kafka/pull/15231#discussion_r1463743747


##########
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java:
##########
@@ -562,33 +568,37 @@ private VoteResponseData handleVoteRequest(
         VoteRequestData.PartitionData partitionRequest =
             request.topics().get(0).partitions().get(0);
 
-        int candidateId = partitionRequest.candidateId();
-        int candidateEpoch = partitionRequest.candidateEpoch();
+        if (partitionRequest.preVote()) {
+            throw new IllegalArgumentException("PreVote is not supported yet");

Review Comment:
   I prefer if we implement this in this PR. That should alleviate @hachikuji 
's comment about adding a version for the Vote RPC without the replica fully 
supporting that version.
   
   We don't need to implement the prospective state and sending Vote request 
with pre-vote set to true in this PR. We just need to implement the handling of 
version 1 of Vote RPC in this PR. That include adding a 
KafkaRaftClientPreVoteTest suite that verifies the correct implementation. 



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

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

Reply via email to