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/11 00:49:38 UTC

[GitHub] [incubator-ratis] runzhiwang commented on a change in pull request #267: RATIS-1145. In NettyServerStreamRpc, the local/remote writes should only wait for the previous write.

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



##########
File path: ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -429,10 +464,9 @@ private void read(ChannelHandlerContext ctx, DataStreamRequestByteBuf request) {
           } else {
             throw new IllegalStateException(this + ": Unexpected type " + request.getType() + ", request=" + request);
           }
+          buf.release();

Review comment:
       If we throw IllegalStateException at previous line, we have no chance to release buf here.




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