openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
853 stars 211 forks source link

Can't properly insert similar labeled Literals and IRIs as Objects on a clean Virtuoso in Version 7.2.4 #634

Open shinobu opened 7 years ago

shinobu commented 7 years ago

I have noticed the following problem concerning Virtuoso through our integration tests:

Certain triples dont get properly inserted for the first time. This means, that the test fails during the first attempt on a clean Virtuoso, but afterwards succeeds. This happens on Version 7.2.4 (I used the docker container "tenforce/virtuoso:1.1.0-virtuoso7.2.4" to reproduce the error)

Minimal example for reproducing the error in the conductor: It's important, that the Store is new and unused (I recommend using docker for testing that as well) Insert into Default Graph URI "http://example.org/" the following triples:

INSERT { 
    <a> <b> <c> .
    <a> <b> "c" .
    <a> <b> "a" .
    <a> <b> <d> . 
}

Result: 3 added

the result looks like this (SELECT * { ?s ?p ?o }):

<a> <b> <c> .
<a> <b> <a> . 
<a> <b> <d> .

There are 2 things wrong here: the second triple is missing and in the third triple the Object Literal changed into an IRI.

now delete everything in the Graph ( DELETE WHERE { ?s ?p ?o } ) now trying to insert the triple in a different order actually works:

INSERT { 
    <a> <b> "c" .
    <a> <b> <c> .
    <a> <b> "a" .
    <a> <b> <d> . 
}

Result: 4 added And this time the 2 Literals are correctly inserted.

Deleting everything again and attempting to use the first query again will result again in the wrong results. Though a whitespace (e.g. add another space or newline) change is enough to let the query work on a second or later run.

Theoretically the tests fail the first time we do them, und succeed the second time. I couldnt exactly reproduce this effect though. ( This is the test that shows this behaviour: https://github.com/AKSW/Erfurt/blob/develop/tests/integration/Erfurt/Rdf/ModelIntegrationTest.php#L166 )

HughWilliams commented 7 years ago

I have been able to recreate this issue and reported to development to look into ...

shinobu commented 7 years ago

OK, thanks for the fast reaction