We insert some data, do the validation check, then commit. Everything is great. Then we user the .get() to get back what we just inserted and we don’t seem to get anything.
Comment out Proof proof = validator.explain().proof(); and everything works fine.
Comment it back in, and we don’t get our data back.
Run it up in debug and suddenly we get our data back again. Very strange. Added a Thread.sleep(5000), doesn’t help.
We are quite stuck now. We want to get hold of explanation for why the validation failed, but we cant loose linearizability.
connection.begin();
Model model = new LinkedHashModel();
try (Stream<Statement> statements = connection.get().subject(id).statements()) {
statements.forEach(model::add);
}
connection.commit();
Where id is the subject of the resource that we added before. Connection here is taken freshly from a pool, but a different pool because we don’t use reasoning here!!!
The data we are adding and getting back out is user data. So along the lines of
<user1> a User;
username "user1".
And one last thing, we are getting the error when running with embedded stardog in a unit test.