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

Prevent race condition in entity filtering #4204

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

jansupol
Copy link
Contributor

Signed-off-by: Jan Supol [email protected]

@jansupol
Copy link
Contributor Author

Unfortunately, I was not able to come up with a solid reproducer/test.

However, when one thread stored a graph graphProvider.getOrCreateEntityGraph(entityClass, forWriter), another thread used the graph before the graph was populated by the first thread. It resulted in a situation where everything was filtered out in an HTTP response, as the unpopulated graph did not contain the entities that should not have been filtered out.

@jansupol
Copy link
Contributor Author

Fixes #4189 #4187

Copy link
Contributor

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as long as there are no side effects to creating a new instance of the EntityGraph

@senivam senivam merged commit 0a867e9 into eclipse-ee4j:master Aug 12, 2019
@jansupol jansupol added this to the 2.29.1 milestone Aug 12, 2019
pa314159 pushed a commit to pa314159/jersey that referenced this pull request Aug 28, 2019
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.

None yet

3 participants