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

Fixes #1065: Make EventDispatcher an instance field #1066

Closed
wants to merge 1 commit into from

Conversation

monitorjbl
Copy link
Contributor

This sidesteps an edge-case wherein a JCache listener in a primary cache mutates a secondary Caffeine cache. While this is typically not a problem, if the thread that mutates the primary cache is from a ForkJoinPool, the EventDispatcher can deadlock as the calling thread may be re-used. Under this condition, the secondary cache mutation is effectively waiting on its own Future and will deadlock.

@CLAassistant
Copy link

CLAassistant commented Jul 11, 2023

CLA assistant check
All committers have signed the CLA.

This sidesteps an edge-case wherein a JCache listener in a primary cache
mutates a secondary Caffeine cache. While this is typically not a problem,
if the thread that mutates the primary cache is from a ForkJoinPool, the
EventDispatcher can deadlock as the calling thread may be re-used. Under
this condition, the secondary cache mutation is effectively waiting on its
own Future and will deadlock.
@monitorjbl monitorjbl changed the title Fix for #1065: Make EventDispatcher an instance field Fixes #1065: Make EventDispatcher an instance field Jul 11, 2023
@ben-manes
Copy link
Owner

cherry-picked and merged.

@ben-manes ben-manes closed this Jul 17, 2023
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

Successfully merging this pull request may close these issues.

3 participants