Skip to content

Fix rate limiter documentation for default burst value#2925

Open
karesansui-u wants to merge 1 commit intolabstack:masterfrom
karesansui-u:fix/rate-limiter-burst-doc
Open

Fix rate limiter documentation for default burst value#2925
karesansui-u wants to merge 1 commit intolabstack:masterfrom
karesansui-u:fix/rate-limiter-burst-doc

Conversation

@karesansui-u
Copy link

The documentation for NewRateLimiterMemoryStore and
NewRateLimiterMemoryStoreWithConfig states that the default Burst
value is the "rounded down" value of the rate. This was accurate when
the documentation was added in #2366, where the code used int(config.Rate).

However, #2852 changed the default burst calculation to use math.Ceil,
making it the rounded up value. The documentation was not updated to
reflect this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant