Closed ttschampel closed 7 years ago
For OrientDB the rule is that one database instance can be used by a thread, because database instances are not thread safe. https://github.com/orientechnologies/orientdb/issues/5490#issuecomment-219045655 https://github.com/mpollmeier/orientdb-gremlin/issues/16 http://orientdb.com/docs/last/Java-Multi-Threading.html
I saw the multithreading docs for OrientDB and the accompanying calls to makeActive() in the OrientGraph. My use case was executing a traversal during a txn (checking for the existence of a vertex) which indirectly hit the index manager.
Are you saying things are executing as expected? Perhaps I'm improperly using the API?
I haven't actually tried to explicitly call makeActive
when sharing the graph instance - I always went for multiple graph instances (one per thread).
I see #112 has been pulled in. This can be marked as a duplicate of that issue - the changes for 112 are the same I did for a local workaround to get past this problem.
When executing in a multi-threaded environment I get errors from calls into OrientGraph.getIndexManager()
Adding makeActiveDb() to the method fixed the problem locally for me.