I have a question regarding graph loading.
I had the following workflow in mind:
- create the graph from an osm file (using
- load multiple hopper instances in different threads (using
Since in 2. I do not any modifications on the graph (I guess?), I expected this to work fine. However, sometimes I get the To avoid reading partial data we need to obtain the read lock Exception. Can you explain why those locks are needed?
If you want to run multiple GH in one JVM (or from different JVMs) you need to ensure that either the import is done fully from one instance alone OR you use different graphHopperLocation’s
I’ll probably use one of the two approaches but I need to document (and want to understand) why it’s not possible to just simultaneously read the graphs.
I would be grateful for your help