Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CQL config option to indicate whether TTL is enabled #3395

Closed
li-boxuan opened this issue Dec 17, 2022 · 0 comments · Fixed by #3400
Closed

Add CQL config option to indicate whether TTL is enabled #3395

li-boxuan opened this issue Dec 17, 2022 · 0 comments · Fixed by #3400

Comments

@li-boxuan
Copy link
Member

#3333 marks the DefaultPartitioner (provided by Amazon Keyspace) support TTL. This is not wrong, but it causes another issue:

I was testing the RC1 release with AWS keyspace, and I encountered an exception saying TTL is not yet supported when I closed the gremlin console connection. Apparently, KCVSLog tried to use TTL, but Amazon Keyspace by default does not support TTL. This TTL needs to be manually enabled in AWS keyspace with extra storage overhead and thus cost. Therefore, we should provide a new config option so that users can indicate whether they have turned on TTL or not.

22:48:16 INFO  org.janusgraph.diskstorage.util.BackendOperation.executeDirect - Temporary exception during backend operation [writingLogSetting]. Attempting backoff retry.
org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
	at io.vavr.API$Match$Case0.apply(API.java:5135) ~[vavr-0.10.4.jar:?]
	at io.vavr.API$Match.of(API.java:5092) ~[vavr-0.10.4.jar:?]
	at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.lambda$static$0(CQLKeyColumnValueStore.java:120) ~[janusgraph-cql-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.cql.function.mutate.AbstractCQLMutateManyUnloggedFunction.mutateMany(AbstractCQLMutateManyUnloggedFunction.java:64) ~[janusgraph-cql-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.cql.CQLStoreManager.mutateMany(CQLStoreManager.java:302) ~[janusgraph-cql-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.mutate(CQLKeyColumnValueStore.java:430) ~[janusgraph-cql-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.keycolumnvalue.ttl.TTLKCVS.mutate(TTLKCVS.java:41) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.log.kcvs.KCVSLog$3.call(KCVSLog.java:915) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.log.kcvs.KCVSLog$3.call(KCVSLog.java:912) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:106) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.util.BackendOperation$1.call(BackendOperation.java:120) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:66) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:52) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:117) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.log.kcvs.KCVSLog.writeSetting(KCVSLog.java:912) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.log.kcvs.KCVSLog.lambda$close$0(KCVSLog.java:346) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.util.system.ExecuteUtil.executeWithCatching(ExecuteUtil.java:32) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.log.kcvs.KCVSLog.close(KCVSLog.java:344) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.util.system.ExecuteUtil.executeWithCatching(ExecuteUtil.java:32) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.log.kcvs.KCVSLogManager.close(KCVSLogManager.java:251) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.util.system.ExecuteUtil.executeWithCatching(ExecuteUtil.java:32) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.diskstorage.Backend.close(Backend.java:598) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.util.system.IOUtils.closeQuietly(IOUtils.java:63) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.graphdb.database.StandardJanusGraph.closeInternal(StandardJanusGraph.java:351) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.graphdb.database.StandardJanusGraph.access$500(StandardJanusGraph.java:136) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at org.janusgraph.graphdb.database.StandardJanusGraph$ShutdownThread.start(StandardJanusGraph.java:939) ~[janusgraph-core-1.0.0-rc1.jar:?]
	at java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:102) ~[?:1.8.0_275]
	at java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:46) ~[?:1.8.0_275]
	at java.lang.Shutdown.runHooks(Shutdown.java:123) ~[?:1.8.0_275]
	at java.lang.Shutdown.sequence(Shutdown.java:170) ~[?:1.8.0_275]
	at java.lang.Shutdown.exit(Shutdown.java:216) ~[?:1.8.0_275]
	at java.lang.Runtime.exit(Runtime.java:109) ~[?:1.8.0_275]
	at java.lang.System.exit(System.java:973) ~[?:1.8.0_275]
	at java_lang_System$exit$3.call(Unknown Source) ~[?:?]
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) ~[groovy-2.5.14-indy.jar:2.5.14]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115) ~[groovy-2.5.14-indy.jar:2.5.14]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127) ~[groovy-2.5.14-indy.jar:2.5.14]
	at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:184) ~[gremlin-console-3.6.1.jar:3.6.1]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_275]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_275]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_275]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_275]
	at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80) ~[groovy-2.5.14-indy.jar:2.5.14]
	at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105) ~[groovy-2.5.14-indy.jar:2.5.14]
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59) ~[groovy-2.5.14-indy.jar:2.5.14]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:237) ~[groovy-2.5.14-indy.jar:2.5.14]
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:265) ~[groovy-2.5.14-indy.jar:2.5.14]
	at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:576) ~[gremlin-console-3.6.1.jar:3.6.1]
Caused by: java.util.concurrent.ExecutionException: com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: TTL is not yet supported.
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_275]
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908) ~[?:1.8.0_275]
	at io.vavr.control.Try.of(Try.java:75) ~[vavr-0.10.4.jar:?]
	at io.vavr.concurrent.Future.lambda$of$11(Future.java:497) ~[vavr-0.10.4.jar:?]
	at io.vavr.concurrent.FutureImpl.lambda$null$3(FutureImpl.java:157) ~[vavr-0.10.4.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_275]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_275]
	at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_275]
Caused by: com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: TTL is not yet supported.
@li-boxuan li-boxuan added this to the Release v1.0.0 milestone Dec 17, 2022
@li-boxuan li-boxuan self-assigned this Dec 17, 2022
li-boxuan added a commit to li-boxuan/janusgraph that referenced this issue Dec 18, 2022
AWS keyspace by default does not support TTL, although it can be turned on. When TTL
support is off, we should let users disable TTL from JanusGraph as well, otherwise
they could see errors like `InvalidQueryException: TTL is not yet supported`.

This also removes timestamps(false) annotation for DefaultPartitioner.
That was most likely a mistake.

Fixes JanusGraph#3395

Signed-off-by: Boxuan Li <liboxuan@connect.hku.hk>
li-boxuan added a commit that referenced this issue Dec 20, 2022
AWS keyspace by default does not support TTL, although it can be turned on. When TTL
support is off, we should let users disable TTL from JanusGraph as well, otherwise
they could see errors like `InvalidQueryException: TTL is not yet supported`.

This also removes timestamps(false) annotation for DefaultPartitioner.
That was most likely a mistake.

Fixes #3395

Signed-off-by: Boxuan Li <liboxuan@connect.hku.hk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant