can't delete anything in the triplestore
bsara opened this issue · 4 comments
I understand that this may be an issue with Fuseki itself. But I figured that I'd start here. I've done lots of googling but can't seem to find the issue anywhere else.
The title says it all. I can't delete any triples from the store.
I have tested this with a stock Fuseki server (I.E. NOT the rdf-delta supplied fuseki server) and I was able to delete records just fine. The only difference between the two instances was the fact that I'm running the rdf-delta version (and the fact that rdf-delta uses the embedded Fuseki rather than the full Fuseki build).
Steps to Reproduce
- Upload some data via a POST on the
/my-data/data
endpoint of the Fuseki server. - Choose some data to delete, then query it to make sure that it's indeed present.
- Try to delete the data queried from step 2 using
DELETE { ... } WHERE { ... }
SPARQL update (you can use a POST withapplication/sparql-update
or multi-part form for the body, neither are working for me). - Run the query you created in step 2.
Result: The data is still present after the second query performed in step 4. Also, an empty patch gets sent to the RDF Delta server...so, I don't believe that the delta server is the issue.
Environment
RDF Delta Version: 0.9.2
RDF Delta Config: My RDF Delta server is connected to a zookeeper instance and stores patches in an S3 bucket. I'm running the delta server using dcmd
and I'm also using a custom jetty config to make the delta server use SSL.
Command Used to Run Fuseki:
$ dcmd fuseki --config=/my-fuseki-config.ttl --https=/http_config.json --gzip=on --ping --stats --metrics
Configuration:
# my-fuseki-config.ttl
@prefix delta: <http://jena.apache.org/rdf-delta#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
[] rdf:type fuseki:Server ;
fuseki:services (
<#myDataService>
)
.
<#myDataService> a fuseki:Service ;
fuseki:name "my-data" ;
fuseki:dataset <#deltaDataset> ;
fuseki:endpoint [ fuseki: operation fuseki:query; ] ;
fuseki:endpoint [ fuseki:operation fuseki:query; fuseki:name "query" ] ;
fuseki:endpoint [ fuseki:operation fuseki:update; ] ;
fuseki:endpoint [ fuseki:operation fuseki:gsp_r; ] ;
fuseki:endpoint [ fuseki:operation fuseki:gsp_rw; fuseki:name "data"; ] ;
.
<#deltaDataset> rdf:type delta:DeltaDataset ;
delta:patchlog "my-service" ;
delta:zone "my-service-zone" ;
delta:dataset <#inferredDataset> ;
delta:changes "https://localhost:1063" ;
.
<#inferredDataset> a ja:RDFDataset ;
ja:defaultGraph <#inferenceModel> ;
.
<#inferenceModel> a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLMiniFBRuleReasoner>
] ;
.
<#tdbGraph> a tdb2:GraphTDB2 ;
tdb2:location "/fuseki/databases/my-data" ;
.
Hi there - this is a complex setup.
If it's easier, running test with a single server, file-backed storage should be OK, at least to get us to the same point, as it does not look like it is dependent on the patch server storage.
I have tried adding and deleting a triple with DATA
with a single server, file-backed storage:
s-query --service 'http://localhost:3030/ds' --output=text 'PREFIX : <http://example/> SELECT * { ?s ?p :o }'
# Empty
s-update --service 'http://localhost:3030/ds 'PREFIX : <http://example/> DELETE DATA { :s :p :o }'
s-query --service 'http://localhost:3030/ds' --output=text 'PREFIX : <http://example/> SELECT * { ?s ?p :o }'
# Triple
s-update --service 'http://localhost:3030/ds' 'PREFIX : <http://example/> DELETE DATA { :s :p :o }'
s-query --service 'http://localhost:3030/ds' --output=text 'PREFIX : <http://example/> SELECT * { ?s ?p :o }'
# Empty
and it seemed to work.
This shows inference was happening:
s-query --service 'http://localhost:3030/ds' --output=text 'PREFIX : <http://example/> SELECT * { ?s ?p :o }'
Could you try without the inference layer?
Ok I've done more digging and found that I can delete, but only if some other triples are deleted first, I'm not sure which though at the moment.
wow, now I feel pretty stupid. I was using the wrong namespace to delete things. it's all working fine. sorry to trouble you.
Not all wasted! There ought to be a inference test case in the test suite. I can take my local setup for this testing as a basis.
Deleting is made more complicated when triples can reappear due to inference rules!