rushsky518 commented on a change in pull request #1758: Fix bug in
MessageClientIDSetter
URL: https://github.com/apache/rocketmq/pull/1758#discussion_r378048610
##########
File path:
common/src/main/java/org/apache/rocketmq/common/message/MessageClientIDSetter.java
##########
@@ -37,13 +37,10 @@
} catch (Exception e) {
ip = createFakeIP();
}
- LEN = ip.length + 2 + 4 + 4 + 2;
- ByteBuffer tempBuffer = ByteBuffer.allocate(ip.length + 2 + 4);
- tempBuffer.position(0);
+ LEN = ip.length + 4 + 4 + 4 + 2;
+ ByteBuffer tempBuffer = ByteBuffer.allocate(ip.length + 4 + 4);
tempBuffer.put(ip);
- tempBuffer.position(ip.length);
tempBuffer.putInt(UtilAll.getPid());
- tempBuffer.position(ip.length + 2);
Review comment:
issue is hereļ¼https://github.com/apache/rocketmq/issues/1751
----------------------------------------------------------------
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]
With regards,
Apache Git Services