eclipse-rdf4j / rdf4j

Eclipse RDF4J: scalable RDF for Java
https://rdf4j.org/
BSD 3-Clause "New" or "Revised" License
367 stars 164 forks source link

GH-5148 Introduce "soft fail" for corrupt ValueStore #5157

Closed hmottestad closed 2 weeks ago

hmottestad commented 1 month ago

GitHub issue resolved: #5148

Briefly describe the changes proposed in this PR:


PR Author Checklist (see the contributor guidelines for more details):

ebner commented 1 month ago

Thanks for the fixes @hmottestad! I haven't had time yet to look into this, but I can contribute to the documentation if you want.

Following up on another comment from your review of my PR: adding a test for an artificially corrupted store may be difficult, I don't really know how to do this reliably. Perhaps it is possible to manipulate a NativeValue instance in the ValueStore to hold an illegal state that triggers the new soft fail functionality. Any other suggestions?

hmottestad commented 1 month ago

I'm actually working on it right now. I have a test that sets each byte in the values.dat file to zero, one at a time, then tries to read all the data.

hmottestad commented 1 month ago

@ebner I've added some test coverage now.

I think it might be best to also try to see what happens if the data is written to a trig or json-ld file, to test the very simple corrupt value implementations i added.