ory / hydra

The most scalable and customizable OpenID Certified™ OpenID Connect and OAuth Provider on the market. Become an OpenID Connect and OAuth2 Provider over night. Broad support for related RFCs. Written in Go, cloud native, headless, API-first. Available as a service on Ory Network and for self-hosters.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=hydra
Apache License 2.0
15.64k stars 1.5k forks source link

fix: use trylock with jitter sleep #3880

Open awill1988 opened 2 weeks ago

awill1988 commented 2 weeks ago

Removes the lock for reading and will leverage TryLock in order to force contentious writers to sleep w/ jitter and attempt to get the key from the database again.

Related issue(s)

3863

Checklist

Further Comments

Appreciate all the time and attention given to this issue. I am happy to test and look for any regression issues this may cause.