Skip to content
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

[Issue 10170] Optimize locks in AuthenticationAthenz #10381

Merged
merged 2 commits into from
Apr 27, 2021

Conversation

massakam
Copy link
Contributor

@massakam massakam commented Apr 26, 2021

Fixes #10170

Currently, AuthenticationAthenz uses synchronized more than necessary. I think the only variables that can cause race conditions with multiple threads are roleToken and cachedRoleTokenTimestamp. Therefore, I introduced a locking object to prevent the race conditions of these two variables, and removed the other synchronized.

@massakam massakam added the type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use label Apr 26, 2021
@massakam massakam added this to the 2.8.0 milestone Apr 26, 2021
@massakam massakam self-assigned this Apr 26, 2021
@massakam
Copy link
Contributor Author

PTAL

@merlimat merlimat merged commit 7c1352d into apache:master Apr 27, 2021
@massakam massakam deleted the optimize-auth-athenz-lock branch April 28, 2021 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize the lock in AuthenticationAthenz
3 participants