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

GH-2795: Fix race condition in datatype registration #2796

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ostrzyciel
Copy link
Contributor

@Ostrzyciel Ostrzyciel commented Oct 26, 2024

GitHub issue resolved #2795

Pull request Description:

Fixed a race condition in user-defined datatype registration. This change only touches the user-friendly getSafeTypeByName and does not change anything from the user's perspective (other than fixing the race condition). The registerDatatype method is left as-is, to allow for overriding datatype registrations if someone really wants to.

I've added some notes to registerDatatype and unregisterDatatype that it they have good "shoot-yourself-in-the-foot-with-a-bazooka" potential.


  • Tests are included – not sure how to test it... do we need tests here?
  • Documentation change and updates are provided for the Apache Jena website
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

@arne-bdt
Copy link
Contributor

I don´t think, this is the way to solve the issue.
--> discussion in #2795 (comment)

@Ostrzyciel
Copy link
Contributor Author

Updated the PR with a different approach as per the discussion in the issue #2795

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.

Race condition in TypeMapper.getSafeTypeByName
2 participants