[ 
https://issues.apache.org/jira/browse/RATIS-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401045#comment-16401045
 ] 

Tsz Wo Nicholas Sze commented on RATIS-210:
-------------------------------------------

Thanks for the review Mukul.

For #1, I tried to add  serverId to StaleReadRequestTypeProto but its value is 
always the same as RaftRpcRequestProto.replyId so that it becomes useless.  
Also, it makes code more complicated since request sending needs to check the 
request type in order to decide where to send the request (to the leader or a 
particular server specified.)  Therefore, I revert the change.

Good catch for #2!

Here is a new patch: r210_20180315.patch 

> Refactor client request proto
> -----------------------------
>
>                 Key: RATIS-210
>                 URL: https://issues.apache.org/jira/browse/RATIS-210
>             Project: Ratis
>          Issue Type: Improvement
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Major
>         Attachments: r210_20180315.patch
>
>
> In RATIS-208, we plan to add a parameter for client specifying the number of 
> required servers in a write request.  In the current code, it is hard (or 
> ugly) to add such parameter.
> In this JIRA, we propose to replace enum Type in RaftClientRequestProto by 
> {code}
>   oneof Type {
>     WriteRequestProto write = 3;
>     ReadRequestProto read = 4;
>     StaleReadRequestProto staleRead = 5;
>   }
> {code}
> so that each proto can carry the request specific parameters.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to