cogcomp-nlpy icon indicating copy to clipboard operation
cogcomp-nlpy copied to clipboard

Remove the temporary cache folders created by MapDB before running local pipeline

Open GHLgh opened this issue 8 years ago • 4 comments

When I am testing the code, sometime it will throw out the following exception JVM exception occurred: Header checksum broken. Store was not closed correctly, or is corrupted when I initialize local pipeline. And it can be solved by removing the annotation-cache file refer to pipeline's documentation

Should I check and remove the file before initializing local pipeline, or there is another way to solve it? @danyaljj @bhargav

GHLgh avatar Apr 07 '17 17:04 GHLgh

What version of the pipeline are we using?

danyaljj avatar Apr 07 '17 17:04 danyaljj

3.1.1

GHLgh avatar Apr 07 '17 17:04 GHLgh

The quick fix is to delete the cache, but it's not a good option. The other (probably better) fix is to set transaction for the pipeline cache, just like how we did it for the client: https://github.com/CogComp/cogcomp-nlp/pull/392

danyaljj avatar Apr 07 '17 17:04 danyaljj

This also happened to Pavan a lot. Most time the JVM is not closed properly which causes this issue. One workaround is to have pipeline methods wrapped with a with-statement so that we can programmatically showdown the JVM. https://docs.python.org/2/library/contextlib.html

bhargav avatar Apr 28 '17 22:04 bhargav