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

Race condition in isApiCoveredByServerKey #8

Closed
wrygiel opened this issue Dec 13, 2017 · 0 comments
Closed

Race condition in isApiCoveredByServerKey #8

wrygiel opened this issue Dec 13, 2017 · 0 comments
Assignees

Comments

@wrygiel
Copy link
Contributor

wrygiel commented Dec 13, 2017

isApiCoveredByServerKey method may incorrectly return false, if it so happens that a new catalogue will be loaded between the retrieval of the apiElement, and calling the isApiCoveredByServerKey method.

This can be easily fixed by caching a reference to the internal CatalogueDocument in all of the returned apiEntry elements. One side effect of that is that the CatalogueDocument won't be garbage-collected, if the user chooses to cache apiEntry elements somewhere. We should educate the developers not to do that.

@wrygiel wrygiel self-assigned this Dec 13, 2017
wrygiel added a commit that referenced this issue Dec 13, 2017
@wrygiel wrygiel closed this as completed Dec 13, 2017
wrygiel added a commit that referenced this issue Dec 13, 2017
ewp-scripts pushed a commit to erasmus-without-paper/ewp-registry-service that referenced this issue Dec 23, 2020
Caching API entry elements may cause exceptions if tests run more than 1 minute:
erasmus-without-paper/ewp-registry-client#8

Change-Id: I453441dfe4f49353be61558cfd04a752c6a8f3e5
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