You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/07 15:00:11 UTC
[GitHub] [dubbo-go] CoolIceV opened a new issue, #1957: rand.Seed() is called every time the p2c algorithm is invoked
CoolIceV opened a new issue, #1957:
URL: https://github.com/apache/dubbo-go/issues/1957
**What happened:**
I found that rand.Seed() is called every time the p2c algorithm is invoked, and may be called concurrently. This may result in always getting the same random number within second.
https://github.com/apache/dubbo-go/blob/b7e348319f82444e18ecda284e20656d7ed3b861/cluster/loadbalance/p2c/loadbalance.go#L75-L84
**What you expected to happen:**
rand.Seed() only called once when init the p2c loadbalancer.
**How to reproduce it (as minimally and precisely as possible):**
**Anything else we need to know?:**
--
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: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] AlexStocks closed issue #1957: rand.Seed() is called every time the p2c algorithm is invoked
Posted by GitBox <gi...@apache.org>.
AlexStocks closed issue #1957: rand.Seed() is called every time the p2c algorithm is invoked
URL: https://github.com/apache/dubbo-go/issues/1957
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] CoolIceV commented on issue #1957: rand.Seed() is called every time the p2c algorithm is invoked
Posted by GitBox <gi...@apache.org>.
CoolIceV commented on issue #1957:
URL: https://github.com/apache/dubbo-go/issues/1957#issuecomment-1177781075
There are similar issues here
https://github.com/apache/dubbo-go/blob/b7e348319f82444e18ecda284e20656d7ed3b861/registry/servicediscovery/instance/random/random_service_instance_selector.go#L43-L53
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org