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/11/12 06:17:47 UTC

[GitHub] [incubator-ratis] amaliujia commented on a change in pull request #272: RATIS-1130. Add E2E test for Ratis streaming based on MiniRaftCluster

amaliujia commented on a change in pull request #272:
URL: https://github.com/apache/incubator-ratis/pull/272#discussion_r521862965



##########
File path: ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -326,8 +327,11 @@ private StreamInfo newStreamInfo(ByteBuf buf) {
   }
 
   static long writeTo(ByteBuf buf, DataStream stream) {
-    final WritableByteChannel channel = stream.getWritableByteChannel();
     long byteWritten = 0;
+    if (stream == null) {

Review comment:
       In current test I am using BaseStateMachine, in which the stream api returns:
   
   https://github.com/apache/incubator-ratis/blob/f91ef63809b21ed65445f4a60d8005ce0a1af8ca/ratis-server/src/main/java/org/apache/ratis/statemachine/StateMachine.java#L91




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