JanusGraph / JanusGraph/janusgraph
storage.transactions=false with berkeleyje backend prevents any write operation
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
It is recommended [in the doc](https://docs.janusgraph.org/storage-backend/bdb/#global-graph-operations) to disable transactions for large graph iteration when using the berkeley backend:
However when I have this config on, I can read with g.V().count() but not add vertex with label `g.addV("fake label")`, strangely enough `g.addV()` works.
I have tested this on version 1.1.0 and 1.2.0
Config:
- JANUS_PROPS_TEMPLATE=berkeleyje
- janusgraph.storage.transactions=false
Did I miss some other config or does disable transaction mean read-only mode ? at the moment it feels like a bug to me.
### Stack Trace
```
org.janusgraph.diskstorage.PermanentBackendException: BerkeleyJE does not support non-transactional for multi threaded tx
at org.janusgraph.diskstorage.berkeleyje.BerkeleyJEStoreManager.beginTransaction(BerkeleyJEStoreManager.java:210)
at org.janusgraph.diskstorage.berkeleyje.BerkeleyJEStoreManager.beginTransaction(BerkeleyJEStoreManager.java:57)
at org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManagerAdapter.beginTransaction(OrderedKeyValueStoreManagerAdapter.java:75)
at org.janusgraph.diskstorage.Backend.beginTransaction(Backend.java:606)
at org.janusgraph.graphdb.database.StandardJanusGraph.openBackendTransaction(StandardJanusGraph.java:483)
at org.janusgraph.graphdb.database.StandardJanusGraph.newTransaction(StandardJanusGraph.java:473)
at org.janusgraph.graphdb.database.StandardJanusGraph$1.retrieveSchemaByName(StandardJanusGraph.java:500)
at org.janusgraph.graphdb.database.cache.StandardSchemaCache.getSchemaId(StandardSchemaCache.java:111)
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.getSchemaVertex(StandardJanusGraphTx.java:1099)
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.getVertexLabel(StandardJanusGraphTx.java:1234)
at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.getOrCreateVertexLabel(StandardJanusGraphTx.java:1239)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsTransaction.addVertex(JanusGraphBlueprintsTransaction.java:135)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph.addVertex(JanusGraphBlueprintsGraph.java:143)
at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph.addVertex(JanusGraphBlueprintsGraph.java:59)
at org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexStartStep.processNextStart(AddVertexStartStep.java:109)
at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:155)
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:192)
at org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor.handleIterator(AbstractOpProcessor.java:98)
at org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.lambda$evalOpInternal$6(AbstractEvalOpProcessor.java:267)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:337)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)```
Contributor guide
Research direction
Start with BerkeleyJEStoreManager.beginTransaction at line 210 and follow the StandardJanusGraph.newTransaction and retrieveSchemaByName calls shown in the stack trace. Reproduce the documented configuration with g.V().count(), g.addV(), and labeled g.addV(); done means the expected write behavior is established and the reported failure is fixed or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100