-
Notifications
You must be signed in to change notification settings - Fork 1
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
Overhaul RDF reading #240
Merged
Overhaul RDF reading #240
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also simplified ScopedValidator and fixed broken compilation in the tests
StaticObjectFetcher and CollectionFetcher (which will be removed) are now broken (to fix the compilation errors)
- Remove TSC2 and TSC2V type constructors, use '(using)' clauses instead, which forced to finalize the 'flavoured-connection' refactoring - Change API for hasStatement and getStatements to be closer to RDF4J (with nulls) to prevent needless creation of Option instances
Also, some plumbing improvements
(breakage occurred due to legit functionality changes)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An "epic" refactoring changing how RDF is read on the back end. The current approach has two fundamental deficiencies:
DataObject
instance. Additionally, many read operations produce aClosableIterator
that keeps the connection open, and close it when fully consumed or explicitly closed. As a result, there is high risk of writing code prone to connection leaks, and this has caused a serious malfunction in production.This PR makes several types of improvements:
TriplestoreConnection
that will handle most read operations instead ofInstanceServer
, who is now used to provide the connection for safe "open connection -> complex read -> close connection" operations.RdfLens
allowing to focusTriplestoreConnection
on different RDF graphs without the need of creating a different RDF4J connection, or using a differentInstanceServer
.TriplestoreConnection
(depending on what RDF graphs they can "see")Validated
datatype to wrap all RDF property cardinality validations instead of throwing exceptions. This allows retaining error information while still producing usable output. The errors are then displayed as warnings on the landing pages (to begin with).