3

I got janusgraph 0.4.0

apache.tinkerpop.gremlin 3.4.2

com.github.jespersm.spring-data-gremlin 1.0.0-SNAPSHOT

and Widnows 10

And i try to run such a test

    Graph graph = JanusGraphFactory.open("inmemory");
    graph.traversal()
         .addV("Org").iterate();

    graph.traversal().tx().commit();

And thats all

when i run this test (or any tests where is JanusGraphFactory.open and tx().commit() after that), i get this exception

    [2019-11-18 16:50:56,774]  INFO builder.ReadConfigurationBuilder: Set default timestamp provider MICRO
    [2019-11-18 16:50:56,790]  INFO idmanagement.UniqueInstanceIdRetriever: Generated unique-instance-id=c0a8014f15872-DESKTOP-DQPEHPP1
    [2019-11-18 16:50:56,801]  INFO diskstorage.Backend: Initiated backend operations thread pool of size 24
    [2019-11-18 16:50:56,875]  INFO kcvs.KCVSLog: Loaded unidentified ReadMarker start time 2019-11-18T13:50:56.873113Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller@6a0659ac
    [2019-11-18 16:50:57,197]  WARN consistentkey.ConsistentKeyLocker: Skipping outdated lock on KeyColumn [k=0x 16-165-160-118-108- 30- 80-101-114-115-111-238, c=0x  0] with our rid ( 99- 48- 97- 56- 48- 49- 52-102- 49- 53- 56- 55- 50- 45- 68- 69- 83- 75- 84- 79- 80- 45- 68- 81- 80- 69- 72- 80- 80- 49) but mismatched timestamp (actual ts 2019-11-18T13:50:57.094518Z, expected ts 2019-11-18T13:50:57.094518800Z)
    [2019-11-18 16:50:57,198] ERROR database.StandardJanusGraph: Could not commit transaction [1] due to storage exception in system-commit
    org.janusgraph.core.JanusGraphException: Could not execute operation due to backend exception

    org.janusgraph.core.JanusGraphException: Could not commit transaction due to exception during persistence

        at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.commit(StandardJanusGraphTx.java:1475)
        at org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph$GraphTransaction.doCommit(JanusGraphBlueprintsGraph.java:297)
        at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.commit(AbstractTransaction.java:104)
        at factograph.core.project.cypher.CypherTransformerTest.someError(CypherTransformerTest.java:159)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
        at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
        at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
        at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
    Caused by: org.janusgraph.core.JanusGraphException: Could not execute operation due to backend exception
        at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:56)
        at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.persist(CacheTransaction.java:91)
        at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.flushInternal(CacheTransaction.java:139)
        at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.commit(CacheTransaction.java:196)
        at org.janusgraph.diskstorage.BackendTransaction.commit(BackendTransaction.java:150)
        at org.janusgraph.graphdb.database.StandardJanusGraph.commit(StandardJanusGraph.java:717)
        at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.commit(StandardJanusGraphTx.java:1464)
        ... 25 more
    Caused by: org.janusgraph.diskstorage.locking.PermanentLockingException: Permanent locking failure
        at org.janusgraph.diskstorage.locking.AbstractLocker.checkLocks(AbstractLocker.java:359)
        at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.checkAllLocks(ExpectedValueCheckingTransaction.java:175)
        at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction.prepareForMutations(ExpectedValueCheckingTransaction.java:154)
        at org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingStoreManager.mutateMany(ExpectedValueCheckingStoreManager.java:72)
        at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:94)
        at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction$1.call(CacheTransaction.java:91)
        at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:68)
        at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:54)
        ... 31 more
    Caused by: org.janusgraph.diskstorage.PermanentBackendException: Read 1 locks with our rid  99- 48- 97- 56- 48- 49- 52-102- 49- 53- 56- 55- 50- 45- 68- 69- 83- 75- 84- 79- 80- 45- 68- 81- 80- 69- 72- 80- 80- 49 but mismatched timestamps; no lock column contained our timestamp (2019-11-18T13:50:57.094518800Z)
        at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSeniority(ConsistentKeyLocker.java:528)
        at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSingleLock(ConsistentKeyLocker.java:454)
        at org.janusgraph.diskstorage.locking.consistentkey.ConsistentKeyLocker.checkSingleLock(ConsistentKeyLocker.java:118)
        at org.janusgraph.diskstorage.locking.AbstractLocker.checkLocks(AbstractLocker.java:351)
        ... 38 more

I was triyng everything!

  1. Remove all m2 folder and mvn clean + reimport, but that do not help
  2. Reload idea by admin and clean idea chache
  3. I tried to run 'bin/JanusGraph.sh clean', but that doest help
  4. Remove every local gremlin and janusgraph dirs, and reload them again
  5. Found one little mention on stackoverflow JanusGraphException: Could not execute operation due to backend exception, but cant undestand whats happend in this solution, what the "zip" does the author mention and how does it help him

Please, somebody, do you know the answer???

Its a VERY strange problem...

5 Answers5

3

I was running into a similar issue and it looks like the config option graph.timestamps can be set in the config file.

If you were to create the graph like:

Configuration conf = new PropertiesConfiguration(propertiesFileName);
Graph graph = GraphFactory.open(conf);

In the file referenced by propertiesFileName, you can set the config option like this:

graph.timestamps=NANO

That solved my issues on Windows.

recursean
  • 46
  • 3
2

I was able to instantiate an in-memory graph with the following:

JanusGraph graph = JanusGraphFactory.build()
    .set(STORAGE_BACKEND.toStringWithoutRoot(), "inmemory")
    .set(TIMESTAMP_PROVIDER.toStringWithoutRoot(), "NANO")
    .open();
Ben Fulton
  • 3,988
  • 3
  • 19
  • 35
2

More info here https://github.com/JanusGraph/janusgraph/issues/1979. It will be fixed in next release

mad
  • 902
  • 1
  • 7
  • 10
1

Finnaly, i foud bad solution, but it works

1) I guess the problem is only on Windows 10 (my colleagues with windows 10 cant run janusgraph localy too), there is some defference with timestamp in graph configuration, cause in stacktrace you can see the message:

    no lock column contained our timestamp (2019-11-18T13:50:57.094518800Z)

The only defference, in linux and in Windows is that on Linux time is in millseconds, but on Windows tim is in nanoseconds

But i could not change this settings, maybe you know how, tell me please if you know!!

2) To run it localy i change from

    graph = JanusGraphFactory.open("inmemory");

to

    String dir = "c:\\opt\\graph";
    CommonsConfiguration config = new CommonsConfiguration();
    config.set(STORAGE_BACKEND.toStringWithoutRoot(), "berkeleyje");
    config.set(STORAGE_DIRECTORY.toStringWithoutRoot(), dir);
    config.set(ALLOW_UPGRADE.toStringWithoutRoot(), false);
    config.set(LOCK_MODE.toStringWithoutRoot(), LockMode.READ_UNCOMMITTED.toString());
    config.set(JVM_CACHE.toStringWithoutRoot(), "50");

    graph = new StandardJanusGraph(new GraphDatabaseConfigurationBuilder().build(config));

And it works

but it is a bad solution

Anyway, i dont know the better one

0

Had the same issue but none of the answers above helped. This one did: https://github.com/JanusGraph/janusgraph/issues/455#issuecomment-646446405

Added "storage.lock.wait-time=1000" to "conf/janusgraph-berkeleyje-lucene-server.properties", restarted the docker service and it worked.

Also, all the configuration options are well documented here: https://docs.janusgraph.org/configs/configuration-reference/

Steven L
  • 1
  • 2