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

Synchronized block in AbstractAuthorizationGrantHandler causes DB connection issue #1142

Open
ruwanta opened this issue Jul 17, 2019 · 0 comments

Comments

@ruwanta
Copy link
Contributor

ruwanta commented Jul 17, 2019

Description:
There is a syncronized block in AbstractAuthorizationGrantHandler

 public OAuth2AccessTokenRespDTO issue(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception 
synchronized ((consumerKey + ":" + authorizedUser + ":" + scope).intern())
...
dbCalls()
...

This causes long running DB queries to timeout all other similar calls, with ThreadDeath
We need to improve this syncronization to handle at the DB level, as the syncronization does not help on cluster/multi-node scenario.

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

No branches or pull requests

1 participant