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

¡resource not found! #164

Open
syphax-bouazzouni opened this issue Jul 13, 2022 · 2 comments
Open

¡resource not found! #164

syphax-bouazzouni opened this issue Jul 13, 2022 · 2 comments

Comments

@syphax-bouazzouni
Copy link

syphax-bouazzouni commented Jul 13, 2022

Hello,

I have recently found that in many of our SPARQL requests, 4store return values that look like this ¡resource dad5d4cb7c7b9e5e not found! instead of the correct value.

To reproduce

4s-backend-destroy ontoportal_kb
4s-backend-setup --segments 4 ontoportal_kb
4s-backend ontoportal_kb

4s-update ontoportal_kb "DELETE {?s ?p ?o } WHERE { ?s ?p ?o}" #clear the triple store

4s-update ontoportal_kb "INSERT DATA {
                         	GRAPH <http://goo.org/default/Project> {
                         		<http://goo.org/default/project/Goo> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://goo.org/default/Project> .
                         		<http://goo.org/default/project/Goo> <http://goo.org/default/name> \"Goo\" .
                         	}
                         }" # insert a project

4s-query ontoportal_kb "SELECT DISTINCT ?id ?attributeProperty  ?attributeObject ?inverseAttributeObject
                        FROM <http://goo.org/default/Project>
                        FROM <http://goo.org/default/Task>
                        WHERE {
                        	?id a <http://goo.org/default/Project> .
                        	OPTIONAL { ?id ?attributeProperty ?attributeObject .  }
                        	OPTIONAL { ?inverseAttributeObject ?attributeProperty ?id .  }
                          FILTER(?attributeProperty = <http://goo.org/default/project> || ?attributeProperty = <http://goo.org/default/name>)
                        }" # list the projects with their tasks (inverse attribute)

What we should have as a result

id attributeProperty attributeObject inverseAttributeObject
http://goo.org/default/project/Goo http://goo.org/default/name Goo

What we actually have

id attributeProperty attributeObject inverseAttributeObject
http://goo.org/default/project/Goo ¡resource dad5d4cb7c7b9e5e not found!
http://goo.org/default/project/Goo http://goo.org/default/name Goo

And in the logs we have the following

➜  4store-original git:(master) ✗ 4s-backend -D ontoportal_kb                
Jul 14 00:20:03  4store[95464] <Info>: 4s-server.c:472 kb=ontoportal_kb runtime information file created
Jul 14 00:20:03  4store[95464] <Info>: 4s-server.c:582 4store backend v1.1.6-NCBO-SNAPSHOT-1 for kb ontoportal_kb on port 6734 (1 fds)
Jul 14 00:20:22  4store[95660] <Warning>: rhash.c:713 resource dad5d4cb7c7b9e5e not found in § 0x1ee70-0x1ee8f of /var/lib/4store/ontoportal_kb/0002/res.rhash
Jul 14 00:26:40  4store[99571] <Warning>: rhash.c:713 resource dad5d4cb7c7b9e5e not found in § 0x1ee70-0x1ee8f of /var/lib/4store/ontoportal_kb/0000/res.rhash

Do you have any idea how to fix it ? (it is maybe related to this #120)

@swh
Copy link
Collaborator

swh commented Jul 14, 2022

I don't think it's related to #120.

I think that when the resource table are create, we preload them with a bunch of common URIs like http://www.w3.org/1999/02/22-rdf-syntax-ns#type. I suspect that the DELETE is wiping them out.

Unfortunately it's been a very long time since I looked at this code, so I'm not sure I could find the error.

Can you confirm it doesn't happen if you delete the KB and recreate on the command line?

@syphax-bouazzouni
Copy link
Author

Thanks for your quick reply,

For the deleting and recreating part of the KB , the three first commands in my to reproduce section ( 4s-backend-destroy ontoportal_kb && 4s-backend-setup --segments 4 ontoportal_kb && 4s-backend ontoportal_kb') are are supposed to do that I think.

But I confirm that even with that the issue is still there.

I may add that this issue (¡resource not found!) occurs only for the predicate (till now).
And we can also have this situation (but it is hard to reproduce)

id attributeProperty attributeObject inverseAttributeObject
http://goo.org/default/project/Goo ¡resource dad5d4cb7c7b9e5e not found! http://goo.org/default/task/task_0
http://goo.org/default/project/Goo http://goo.org/default/name Goo

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

2 participants