JanusGraph / janusgraph

JanusGraph: an open-source, distributed graph database
https://janusgraph.org
Other
5.32k stars 1.17k forks source link

Graph variable doesn't work with Amazon Keyspaces #3050

Closed To-om closed 2 years ago

To-om commented 2 years ago

I know that the support of Amanzon Keyspaces is experimental (#2644) Using JanusGraph 0.6.1, I get this error when I try to access graph variables:

org.janusgraph.core.JanusGraphException: Could not execute operation due to backend exception
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:54)
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:117)
    at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration.get(KCVSConfiguration.java:96)
    at org.janusgraph.graphdb.tinkerpop.JanusGraphVariables.get(JanusGraphVariables.java:48)
    ... 14 common frames omitted
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Could not successfully complete backend operation due to repeated temporary exceptions after PT1M
    at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:98)
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:52)
    ... 35 common frames omitted
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
    at io.vavr.API$Match$Case0.apply(API.java:5135)
    at io.vavr.API$Match.of(API.java:5092)
    at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.lambda$static$0(CQLKeyColumnValueStore.java:120)
    at io.vavr.control.Try.getOrElseThrow(Try.java:748)
    at org.janusgraph.diskstorage.cql.function.slice.CQLExecutorServiceSliceFunction.getSlice(CQLExecutorServiceSliceFunction.java:49)
    at org.janusgraph.diskstorage.cql.function.slice.AbstractCQLSliceFunction.getSlice(AbstractCQLSliceFunction.java:48)
    at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.getSlice(CQLKeyColumnValueStore.java:359)
    at org.janusgraph.diskstorage.keycolumnvalue.KCVSProxy.getSlice(KCVSProxy.java:82)
    at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration$1.call(KCVSConfiguration.java:99)
    at org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration$1.call(KCVSConfiguration.java:96)
    at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:106)
    at org.janusgraph.diskstorage.util.BackendOperation$1.call(BackendOperation.java:120)
    at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:66)
    ... 36 common frames omitted
Caused by: java.util.concurrent.ExecutionException: com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Consistency level QUORUM is not supported for this operation. Supported consistency levels are: ONE, LOCAL_QUORUM, LOCAL_ONE
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
    at io.vavr.control.Try.of(Try.java:75)
    at io.vavr.concurrent.Future.lambda$of$11(Future.java:497)
    at io.vavr.concurrent.FutureImpl.lambda$null$3(FutureImpl.java:157)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Consistency level QUORUM is not supported for this operation. Supported consistency levels are: ONE, LOCAL_QUORUM, LOCAL_ONE

After some research, I found that graph variables use a inconsistent transaction which uses the default consistency: QUORUM (ExpectedValueCheckingStoreManager:91). I didn't find how to change it in the configuration. Keyspaces doesn't support QUORUM consistency.

li-boxuan commented 2 years ago

@To-om Do you have an example or steps to reproduce? I am not sure what you mean by "Graph variable".

To-om commented 2 years ago

The steps that raise the error is graph.variables().get("my_var"), which return an optional value. You can find more info on tinkerpop documentation.

li-boxuan commented 2 years ago

Got it, thanks for reporting! I can reproduce it on v0.6 branch.

li-boxuan commented 2 years ago

Thanks for reporting! This is fixed and will be released in 0.6.2.