-
Notifications
You must be signed in to change notification settings - Fork 1.5k
handlers: add thread-safe initialization for gzipPool #7828
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
handlers: add thread-safe initialization for gzipPool #7828
Conversation
9a5d281 to
72cd092
Compare
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
johanfylling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
21330fc to
a4c4459
Compare
70c4c12 to
c22ba33
Compare
Fixes race condition in initGzipPool() that was causing go race test failures when multiple tests run concurrently. The package-level gzipPool variable was being unsafely reassigned across without synchronization. RWMutex ensures that the gzipPool is only initialized once. Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
c22ba33 to
de6da1c
Compare
johanfylling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes race condition in initGzipPool() that was causing go race test failures when multiple tests run concurrently. The package-level gzipPool variable was being unsafely reassigned across without synchronization.
RWMutex ensures that the gzipPool is only initialized once.