x/time/rate: Parallel reservations in Limiter.WaitN are served in parallel, violating rate limit #43858
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?go version go1.14.13 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
The rate achieved by the 10 goroutines should not exceed the rate limit.
What did you see instead?
The overall rate is 10x what it should be.
Suspected Cause
https://github.com/golang/time/blob/7e3f01d253248a0a5694eb5b7376dfea18b6397e/rate/rate.go#L345
should be
The text was updated successfully, but these errors were encountered: