You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/04/14 02:49:07 UTC

[GitHub] [rocketmq] rushsky518 opened a new issue #1936: polish PullMessageProcessor#readGetMessageResult

rushsky518 opened a new issue #1936: polish PullMessageProcessor#readGetMessageResult
URL: https://github.com/apache/rocketmq/issues/1936
 
 
   In `PullMessageProcessor#readGetMessageResult`, variable storeTimestamp is setted too many times.
   ````java
   List<ByteBuffer> messageBufferList = getMessageResult.getMessageBufferList();
   for (ByteBuffer bb : messageBufferList) {
   
   	byteBuffer.put(bb);
   	int sysFlag = bb.getInt(MessageDecoder.SYSFLAG_POSITION);
   //                bornhost has the IPv4 ip if the MessageSysFlag.BORNHOST_V6_FLAG bit of sysFlag is 0
   //                IPv4 host = ip(4 byte) + port(4 byte); IPv6 host = ip(16 byte) + port(4 byte)
   	int bornhostLength = (sysFlag & MessageSysFlag.BORNHOST_V6_FLAG) == 0 ? 8 : 20;
   	int msgStoreTimePos = 4 // 1 TOTALSIZE
   		+ 4 // 2 MAGICCODE
   		+ 4 // 3 BODYCRC
   		+ 4 // 4 QUEUEID
   		+ 4 // 5 FLAG
   		+ 8 // 6 QUEUEOFFSET
   		+ 8 // 7 PHYSICALOFFSET
   		+ 4 // 8 SYSFLAG
   		+ 8 // 9 BORNTIMESTAMP
   		+ bornhostLength; // 10 BORNHOST
   	storeTimestamp = bb.getLong(msgStoreTimePos);
   }
   ````
   

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


With regards,
Apache Git Services

[GitHub] [rocketmq] rushsky518 commented on issue #1936: polish PullMessageProcessor#readGetMessageResult

Posted by GitBox <gi...@apache.org>.
rushsky518 commented on issue #1936: polish PullMessageProcessor#readGetMessageResult
URL: https://github.com/apache/rocketmq/issues/1936#issuecomment-615059295
 
 
   #1935 

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


With regards,
Apache Git Services

[GitHub] [rocketmq] wlliqipeng commented on issue #1936: polish PullMessageProcessor#readGetMessageResult

Posted by GitBox <gi...@apache.org>.
wlliqipeng commented on issue #1936: polish PullMessageProcessor#readGetMessageResult
URL: https://github.com/apache/rocketmq/issues/1936#issuecomment-614631569
 
 
   You can submit a PR to solve these problems:)

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


With regards,
Apache Git Services