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



##########
File path: 
ratis-netty/src/main/java/org/apache/ratis/netty/client/DataStreamReplyDecoder.java
##########
@@ -29,25 +29,22 @@
 
   @Override
   protected void decode(ChannelHandlerContext channelHandlerContext,
-                        ByteBuf byteBuf, List<Object> list) throws Exception {
+                        ByteBuf byteBuf, List<Object> list) {
 
     if(byteBuf.readableBytes() >= 24){

Review comment:
       Ah I see. It seems that there are at least 3 long at the beginning of 
the buffer to serve as metadata. That's why here checks >= 24 bytes.
   
   It will be useful to have javadoc on encode/decode functions to document the 
encoding format.




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