geneontology/minerva

Trace save/flush command and make sure equivalent to --dump-owl-models

Closed this issue · 6 comments

kltm commented

In conversation with @balhoff and @vanaukenk today, we'll be changing the minerva outage SOP.
One thing that we'd like to improve would be how models get flushed.

Currently, through the API, we use the manager.store_all() command. That maps to the function:

var store_req = new request('meta', 'store-all');

It would be good to trace this through minerva and make sure that

  • stopping minerva
  • --dump-owl-models

is equivalent to this command.

@kltm can you translate that into a request URL for Minerva? I can find a store model-level operation, and an export-all operation.

kltm commented

@balhoff Okay, digging around a little, you should be interested in export-all, going through m3BatchPrivileged. If you need the actually URL, I can dig in a bit more (the logger is currently not writing on dev).

export-all simply writes all models found in the Blazegraph journal to files. If there are unsaved changes, they will be lost. This calls the same code as the CLI option dump-owl-models:

public void dumpAllStoredModels() throws OWLOntologyStorageException, OWLOntologyCreationException, IOException {

Compare:

kltm commented

@balhoff "unsaved changes, they will be lost"--are you saying here that unsaved changes get purged when that method runs?

Either way, the new SOP would be doing the same thing, so I think technically this is completed (although I'd like to get clarification there before closing).

@balhoff "unsaved changes, they will be lost"--are you saying here that unsaved changes get purged when that method runs?

Oh, no, I mean that unsaved changes are ignored. It just dumps what has been committed to the database.

kltm commented

Sounds good--clarification had and I think we're done here. Thank you for tracing that behavior.