-
Notifications
You must be signed in to change notification settings - Fork 22
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
subjects used as predicates don't have iris in query results #521
Comments
This is due to how we find vocab flakes. On each transaction we check the new flakes for vocab flakes. That is done by checking if any new flakes have a subject in the "predicate" range. A subject that is created without being used as a predicate is assigned a subject id in the general "subject" range, and so it doesn't trigger a We need some sort of general way of telling when we have new vocabulary that won't degrade performance, since we do this vocabulary check in a lot of places. |
We do have a workaround in the case where we know/suspect a given iri will be used as a predicate in the future. In those cases we can add the predefined pid to the |
For additional context: https://fluree-internal.slack.com/archives/C04AA19P3FW/p1692392282856609 |
Moved to top of backlog as it impacts integration of FlureeSense data output into v3 |
Before this commit each selector used the iri-cache differently, and therefore gave broken results if they were combined in a scenario that required iri lookups. This normalizes the cache structure by making every cache update insert an entry in the form of `(vswap! iri-cache assoc pid {:as <iri>})`, so that every cache read can use the results regardless of where it was first inserted. The other fix in this commit is adding a `dbproto/-iri` lookup to the `response/wildcard-spec` function. Before it would return a raw pid in the response, which is unhelpful for users. fixes #521
Before this commit each selector used the iri-cache differently, and therefore gave broken results if they were combined in a scenario that required iri lookups. This normalizes the cache structure by making every cache update insert an entry in the form of `(vswap! iri-cache assoc pid {:as <iri>})`, so that every cache read can use the results regardless of where it was first inserted. The other fix in this commit is adding a `dbproto/-iri` lookup to the `response/wildcard-spec` function. Before it would return a raw pid in the response, which is unhelpful for users. fixes #521
@dpetran -- just want to confirm that you saw this message in Slack Before we close this, I just want to confirm that this behavior (at least against http-api-gateway) is still seeing properties that are inserted via nested JSON-LD are still returning integers instead of IRIs in query results |
If a subject is created in one transaction and then used as a predicate in another transaction, the query will fail to translate the predicate id into an iri.
The text was updated successfully, but these errors were encountered: