runzhiwang commented on a change in pull request #250:
URL: https://github.com/apache/incubator-ratis/pull/250#discussion_r515941732
##########
File path:
ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -210,6 +218,8 @@ StreamInfo get(Key key) {
private final ExecutorService executorService;
+ private final List<ExecutorService> streamExecutors = new ArrayList<>();
+
Review comment:
> for any moment of time, our program must guarantee only one thread
calling channel.write(buffer)
@szetszwo Current implementation can not guarantee only one thread calling
channel.write(buffer) at the same time. For example, If we only change
`localWrite = info.getStream().thenApply(stream -> writeTo(buf, stream));` to
`localWrite = info.getStream().thenApplyAsync(stream -> writeTo(buf, stream),
executorService);`. we can not pass the UT.
##########
File path:
ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -210,6 +218,8 @@ StreamInfo get(Key key) {
private final ExecutorService executorService;
+ private final List<ExecutorService> streamExecutors = new ArrayList<>();
+
Review comment:
@szetszwo Could you help review this comment ?
----------------------------------------------------------------
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]