You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/11/04 02:58:24 UTC

[GitHub] [rocketmq] liweiyuan commented on a diff in pull request #5463: [ISSUE #5462] Remove RemotingCommand.decode parse header repeated calculation

liweiyuan commented on code in PR #5463:
URL: https://github.com/apache/rocketmq/pull/5463#discussion_r1013558421


##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/RemotingCommand.java:
##########
@@ -181,13 +181,12 @@ public static RemotingCommand decode(final ByteBuffer byteBuffer) throws Remotin
 
     public static RemotingCommand decode(final ByteBuf byteBuffer) throws RemotingCommandException {
         int length = byteBuffer.readableBytes();
-        int oriHeaderLen = byteBuffer.readInt();
-        int headerLength = getHeaderLength(oriHeaderLen);
+        int headerLength = byteBuffer.readInt();

Review Comment:
   to optimize the codeļ¼Œ support get protocol type from ByteBuf



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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org