-
Notifications
You must be signed in to change notification settings - Fork 720
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
controller: fix limiter cannot work well in high concurrency scenario (…
…#8436) (#8438) close #8435 controller: Fix limiter not functioning well in high concurrency scenarios - In high concurrency scenarios, time may appear rollback because the `now` value passed from outside. high mutext completion leading to more non-sequential execution orders. - Time rollback allows advancing more tokens, which can cause the issue. even result in no limit for the controller. - Fix the problem by avoiding time rollback; instead of acquiring time again within the lock to fix it, as this might incur high costs when frequently acquiring time. Signed-off-by: nolouch <[email protected]> Co-authored-by: nolouch <[email protected]>
- Loading branch information
1 parent
cb8da1b
commit f1a9096
Showing
2 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters