You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by GitBox <gi...@apache.org> on 2020/12/22 04:04:31 UTC

[GitHub] [incubator-ratis] szetszwo commented on a change in pull request #366: RATIS-1254. Add transfer leadership request and proto

szetszwo commented on a change in pull request #366:
URL: https://github.com/apache/incubator-ratis/pull/366#discussion_r547055140



##########
File path: ratis-proto/src/main/proto/Raft.proto
##########
@@ -369,6 +369,12 @@ message SetConfigurationRequestProto {
   repeated RaftPeerProto peers = 2;
 }
 
+// transfer leadership request
+message TransferLeadershipRequestProto {
+  RaftRpcRequestProto rpcRequest = 1;
+  RaftPeerProto targetPeer = 2;

Review comment:
       Let's name it newLeader.

##########
File path: ratis-client/src/main/java/org/apache/ratis/client/RaftClient.java
##########
@@ -68,6 +68,9 @@
   /** Send set configuration request to the raft service. */
   RaftClientReply setConfiguration(RaftPeer[] serversInNewConf) throws IOException;
 
+  /** Transfer leadership to the given server.*/
+  RaftClientReply transferLeadership(RaftGroupId group, RaftPeerId target) throws IOException;

Review comment:
       Let's rename the parameter to "newLeader".




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