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 2021/04/08 12:53:15 UTC

[GitHub] [rocketmq-client-go] NAND86 opened a new pull request #643: fix: fix crash on selecting queue.

NAND86 opened a new pull request #643:
URL: https://github.com/apache/rocketmq-client-go/pull/643


   ## What is the purpose of the change
   
   fix crash on selecting queue.
   
   ## Brief changelog
   
   https://github.com/golang/go/blob/a7e16abb22f1b249d2691b32a5d20206282898f2/src/math/rand/rand.go#L7-L20
   
   The default Source is safe for concurrent use by multiple goroutines, but Sources created by NewSource are not.
   如上所述,math/rand中通过NewSource创建的rand方法不是线程安全的。多协程发送消息时,不加锁的情况下同时select queue会因数组越界导致panic。
   
   panic如下:
   panic: runtime error: index out of range [-1]
   


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



[GitHub] [rocketmq-client-go] ShannonDing merged pull request #643: fix: fix crash on selecting queue.

Posted by GitBox <gi...@apache.org>.
ShannonDing merged pull request #643:
URL: https://github.com/apache/rocketmq-client-go/pull/643


   


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



[GitHub] [rocketmq-client-go] wenfengwang commented on pull request #643: fix: fix crash on selecting queue.

Posted by GitBox <gi...@apache.org>.
wenfengwang commented on pull request #643:
URL: https://github.com/apache/rocketmq-client-go/pull/643#issuecomment-819171560


   LGTM, will merge after an issue linked


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



[GitHub] [rocketmq-client-go] maixiaohai commented on pull request #643: fix: fix crash on selecting queue.

Posted by GitBox <gi...@apache.org>.
maixiaohai commented on pull request #643:
URL: https://github.com/apache/rocketmq-client-go/pull/643#issuecomment-818601962


   Plz create a related issue before submit a pr.


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