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

Mukul Kumar Singh commented on RATIS-210:
-----------------------------------------

Thanks for working on this [~szetszwo]. The patch looks good to me. Some 
comments inline

1) I feel that we can also encapsulate the serverid field inside the 
StaleReadRequestTypeProto.
With this we can also add a check that the stale read request as actually 
forwarded to the correct Raft server as well.

2) RaftClientRequest.java:94, the assert around Objects.requireNonNull can be 
added for stale request as well.

> 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_20180224.patch, r210_20180306.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