2259289435 commented on issue #1758: [ISSUE #175]Fix bug in 
MessageClientIDSetter
URL: https://github.com/apache/rocketmq/pull/1758#issuecomment-585042982
 
 
   pid是short值,原先的写法putInt在后退两2,抹掉了低位,导致单机多jvm时pid的隔离效果消失,msgid会产生重复的bug
   
   所以直接putshort((short)pid)就可以修复这个问题了,后续都不用动,也符合原先pid 占用 2 的本意。
   不需要修改成占用 4
   
   
   
   [email protected]
    
   From: rushsky518
   Date: 2020-02-12 13:38
   To: apache/rocketmq
   CC: Subscribed
   Subject: Re: [apache/rocketmq] Fix bug in MessageClientIDSetter (#1758)
   @rushsky518 commented on this pull request.
   
   
   In 
common/src/main/java/org/apache/rocketmq/common/message/MessageClientIDSetter.java:
   >          tempBuffer.putInt(UtilAll.getPid());
   -        tempBuffer.position(ip.length + 2);
   
   issue is here:#1751
   —
   You are receiving this because you are subscribed to this thread.
   Reply to this email directly, view it on GitHub, or unsubscribe.
   

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

Reply via email to