geneontology / minerva

BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

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

Closed kltm closed 2 years ago

kltm commented 2 years ago

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

is equivalent to this command.

balhoff commented 2 years ago

@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 2 years ago

@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).

balhoff commented 2 years ago

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: https://github.com/geneontology/minerva/blob/daa78af32e316dab534fdc64ba3a2dbfa5f954ad/minerva-core/src/main/java/org/geneontology/minerva/BlazegraphMolecularModelManager.java#L767

Compare:

kltm commented 2 years ago

@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 commented 2 years ago

@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 2 years ago

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