runzhiwang commented on a change in pull request #308:
URL: https://github.com/apache/incubator-ratis/pull/308#discussion_r533102773



##########
File path: 
ratis-test/src/test/java/org/apache/ratis/datastream/DataStreamTestUtils.java
##########
@@ -343,10 +343,8 @@ static void assertHeader(RaftServer server, 
RaftClientRequest header, int dataSi
 
   static void assertRaftClientMessage(RaftClientMessage expected, RaftPeerId 
expectedServerId, RaftClientMessage computed) {
     Assert.assertNotNull(computed);
-    Assert.assertEquals(expected.getClientId(), computed.getClientId());

Review comment:
       > In more details, Primary receives a RaftClientRequest R from a client 
as usual. Then, it encodes R as a Message, puts it in a new RaftClientRequest F 
and sends it to the Leader. Since Leader sees that the Type is 
ForwarededRequestTypeProto, it will decode the Message back to R and then 
processes R.
   
   RaftClientRequest R -> primary's client wrap RaftClientRequest R in 
RaftClientRequest F -> leader decode R from F -> leader response 
RaftClientReply of R -> leader convert RaftClientReply of R to RaftClientReply 
of F.
   
   @szetszwo Because the ClientId and CallId of F's RaftClientReply belongs to 
primary's client. So we can not check the ClientId and CallId of F's  
RaftClientReply.




----------------------------------------------------------------
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:
[email protected]


Reply via email to