I have a high level code like this.
MethodXyz() {
updateVertex(A, props1)
commit
// some other code
updateVertex(A, props2)
commit
// do something else - long running
}
This method is called from 10+ different threads for different vertices, specifically through Java thread ExecutorSerevice initialized with 10+ threads
I am getting exception like below in 2nd commit in above method from 4-5 threads randomly out of 10+ all the time.
I do not use any uniqueness constraints on the vertex property
I do have defined vertex property "name" as String data type which is unique (application code guarantees this uniqueness without using any unique constraints while making the property key in Janusgraph)
However I build index using this property key "name"
default schema make is used - no explicit schema defined
I am trying to figure out why permanent lock exception is thrown even though different threads update completely different vertices (mutually exclusive) and also why locking exception when there is no property key defined as unique to use any janusgrpah locks.
org.janusgraph.core.JanusGraphException: Could not commit transaction due to exception during persistence**
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.commit(StandardJanusGraphTx.java:1385)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph$GraphTransaction.doCommit(JanusGraphBlueprintsGraph.java:272)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.commit(AbstractTransaction.java:104)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at com.fujitsu.fnc.mlpce.tetopology.impl.GraphDBService.commit(GraphDBService.java:509)[119:com.fujitsu.fnc.mlpce.tetopology.impl:5.2.0.SNAPSHOT]
Caused by: org.janusgraph.core.JanusGraphException: Unexpected exception
at org.janusgraph.graphdb.database.StandardJanusGraph.commit(StandardJanusGraph.java:806)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.commit(StandardJanusGraphTx.java:1374)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
... 17 more
Caused by: org.janusgraph.diskstorage.locking.PermanentLockingException: Local lock contention**
at org.janusgraph.diskstorage.locking.AbstractLocker.writeLock(AbstractLocker.java:327)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingStore.acquireLock(ExpectedValueCheckingStore.java:103)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at org.janusgraph.diskstorage.keycolumnvalue.KCVSProxy.acquireLock(KCVSProxy.java:52)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at org.janusgraph.diskstorage.BackendTransaction.acquireIndexLock(BackendTransaction.java:256)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at org.janusgraph.graphdb.database.StandardJanusGraph.prepareCommit(StandardJanusGraph.java:572)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
at org.janusgraph.graphdb.database.StandardJanusGraph.commit(StandardJanusGraph.java:702)[488:org.janusgraph.janusgraph-core:5.2.0.SNAPSHOT]
... 18 more
jansugraph 0.2.0 with cassandra backend