You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "FrankYang0529 (via GitHub)" <gi...@apache.org> on 2025/04/02 13:06:11 UTC

[PR] KAFKA-18563: move RaftClientTestContext RpcVersion methods into RaftProtocol [kafka]

FrankYang0529 opened a new pull request, #19349:
URL: https://github.com/apache/kafka/pull/19349

   There are lot of xyzRpcVersion which returning value by checking RaftProtocol. It's better to include these functions in RaftProtocol itself. 


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-18563: move RaftClientTestContext RpcVersion methods into RaftProtocol [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19349:
URL: https://github.com/apache/kafka/pull/19349#issuecomment-4293501468

   This PR is being marked as stale since it has not had any activity in 90 days. If you
   would like to keep this PR alive, please leave a comment asking for a review. If the PR has 
   merge conflicts, update it with the latest from the base branch.
   <p>
   If you are having difficulty finding a reviewer, please reach out on the 
   [mailing list](https://kafka.apache.org/contact).
   <p>
   If this PR is no longer valid or desired, please feel free to close it. If no activity
   occurs in the next 30 days, it will be automatically closed.


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-18563: move RaftClientTestContext RpcVersion methods into RaftProtocol [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #19349:
URL: https://github.com/apache/kafka/pull/19349


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-18563: move RaftClientTestContext RpcVersion methods into RaftProtocol [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #19349:
URL: https://github.com/apache/kafka/pull/19349#issuecomment-2988945048

   @FrankYang0529 please fix conflicts


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-18563: move RaftClientTestContext RpcVersion methods into RaftProtocol [kafka]

Posted by "FrankYang0529 (via GitHub)" <gi...@apache.org>.
FrankYang0529 commented on PR #19349:
URL: https://github.com/apache/kafka/pull/19349#issuecomment-2999218841

   @chia7712 I fixed conflicts. Could you review again when you have time? Thanks.


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-18563: move RaftClientTestContext RpcVersion methods into RaftProtocol [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #19349:
URL: https://github.com/apache/kafka/pull/19349#discussion_r3186504485


##########
raft/src/test/java/org/apache/kafka/raft/RaftClientTestContext.java:
##########
@@ -2091,127 +2091,49 @@ UpdateRaftVoterResponseData updateVoterResponse(
         );
     }
 
-    private short fetchRpcVersion() {
-        if (raftProtocol.isHwmInFetchSupported()) {
-            return 18;
-        } else if (raftProtocol.isReconfigSupported()) {
-            return 17;
-        } else {
-            return 16;
-        }
-    }
-
-    private short fetchSnapshotRpcVersion() {
-        if (raftProtocol.isReconfigSupported()) {
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-
-    short voteRpcVersion() {
-        if (raftProtocol.isPreVoteSupported()) {
-            return 2;
-        } else if (raftProtocol.isReconfigSupported()) {
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-
-    private short beginQuorumEpochRpcVersion() {
-        if (raftProtocol.isReconfigSupported()) {
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-
-    private short endQuorumEpochRpcVersion() {
-        if (raftProtocol.isReconfigSupported()) {
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-
-    private short describeQuorumRpcVersion() {
-        if (raftProtocol.isReconfigSupported()) {
-            return 2;
-        } else {
-            return 1;
-        }
-    }
-
-    private short addVoterRpcVersion() {
-        if (raftProtocol.isAutoJoinSupported()) {

Review Comment:
   `isAutoJoinSupported` is unused after this change. Would you mind removing this lone method?



-- 
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-unsubscribe@kafka.apache.org

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