dsp-api icon indicating copy to clipboard operation
dsp-api copied to clipboard

If ontologies can't be loaded because they're invalid, Knora should go into an error state

Open benjamingeer opened this issue 7 years ago • 5 comments

On startup, when OntologyResponderV2 receives the message LoadOntologiesRequestV2, it loads and validates all ontologies. If an ontology is invalid, it throws InconsistentTriplestoreDataException. This should cause Knora to go into an error state. The only way to recover from this state would be to load the ontologies again.

benjamingeer avatar Jul 03 '18 08:07 benjamingeer

How should Knora recover from this? Would the user be also required to restart Knora after the data in the triplestore was reloaded?

subotic avatar Jul 03 '18 10:07 subotic

More precisely, would a manual restart of Knora be sufficient, or should Knora try to reload the ontologies periodically?

subotic avatar Jul 03 '18 10:07 subotic

I don’t think Knora should retry automatically in this case. Only the user knows when the ontologies are ready to be loaded again. I guess the user could either restart Knora when ready, or click on a button in the admin interface to send another LoadOntologiesRequestV2.

benjamingeer avatar Jul 03 '18 11:07 benjamingeer

But in any case, Knora shouldn’t accept any normal (non-admin) API requests while it’s in the error state, otherwise every request will return a rather unfriendly error.

benjamingeer avatar Jul 03 '18 11:07 benjamingeer

ok, thanks for the input.

subotic avatar Jul 03 '18 12:07 subotic