Skip to content

Fix data race issue in globalShadowMode variable #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 4, 2022

Conversation

renuka-fernando
Copy link
Contributor

Description

GlobalShadowMode is written when the config is reloaded from environment variables

this.globalShadowMode = rlSettings.GlobalShadowMode

And it is read here

if finalCode == pb.RateLimitResponse_OVER_LIMIT && this.globalShadowMode {

which may lead to a data race condition

globalShadowMode is written when config is reloaded and read in here, which may lead to data race condition

Signed-off-by: Renuka Fernando <[email protected]>
@mattklein123 mattklein123 merged commit bc3eca4 into envoyproxy:main Nov 4, 2022
barroca pushed a commit to barroca/ratelimit that referenced this pull request Sep 1, 2023
globalShadowMode is written when config is reloaded and read in here, which may lead to data race condition

Signed-off-by: Renuka Fernando <[email protected]>
timcovar pushed a commit to goatapp/ratelimit that referenced this pull request Jan 16, 2024
globalShadowMode is written when config is reloaded and read in here, which may lead to data race condition

Signed-off-by: Renuka Fernando <[email protected]>
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.

2 participants