[go: nahoru, domu]

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

Fix deadlock caused by concurrent class loading #639

Merged
merged 1 commit into from
May 16, 2019
Merged

Fix deadlock caused by concurrent class loading #639

merged 1 commit into from
May 16, 2019

Conversation

edalquist
Copy link
Contributor

When loading generated data classes concurrently the ProGuard protection which calls Data.nullOf in a static initializer can result in a deadlock on the Data.NULL_CACHE lock. The fix is to emulate ConcurrentMap.computeIfAbsent to protect against blocking during concurrent populate of the cache.

Fixes #638

When loading generated data classes concurrently the ProGuard protection which calls Data.nullOf in a static initializer can result in a deadlock on the Data.NULL_CACHE lock. The fix is to emulate ConcurrentMap.computeIfAbsent to protect against blocking during concurrent populate of the cache.
@edalquist edalquist requested a review from a team as a code owner May 16, 2019 22:30
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 16, 2019
@chingor13 chingor13 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2019
@chingor13 chingor13 merged commit 1c68403 into googleapis:master May 16, 2019
chingor13 added a commit to chingor13/google-http-java-client that referenced this pull request Jun 6, 2019
chingor13 added a commit that referenced this pull request Jun 6, 2019
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrent loading of generated classes can result in a deadlock
4 participants