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



##########
File path: 
ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -51,27 +57,52 @@
   private RandomAccessFile stream;
   private FileChannel fileChannel;
   private File file = new File("client-data-stream");
+  private List<DataStreamClientImpl> clients = new ArrayList<>();
+  private List<DataStreamOutput> streams = new ArrayList<>();

Review comment:
       yeah this is a good point.
   
   Each `client.stream()` will increase stream id, I am not sure if changing 
stream id matters. For example, if client sends 100 message, they will under 
the format of same stream id and 100 different message id. if we do 
`client.stream()` each time here, the messages forwarded to peers will become 
the format of different stream id, same message id (assume message id counts 
from 0 for each stream id), which seemed not right.
   
   However, I am not sure when stream id for the forwarded steam should be 
updated within a `NettyServerStreamRpc`




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