[
https://issues.apache.org/jira/browse/CASSJAVA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945721#comment-17945721
]
Michael Karsten commented on CASSJAVA-89:
-----------------------------------------
[~andrew.tolbert] let me know your thoughts on my proposal above. Also LMK how
you'd like to collab. I tried joining the cassandra slack channel, but got the
runaround in the Apache docs b/c I don't have an apache.org email address.
> Using deprecated features in latest java driver
> -----------------------------------------------
>
> Key: CASSJAVA-89
> URL: https://issues.apache.org/jira/browse/CASSJAVA-89
> Project: Apache Cassandra Java driver
> Issue Type: Bug
> Reporter: Michael Karsten
> Assignee: Michael Karsten
> Priority: Normal
> Time Spent: 10m
> Remaining Estimate: 0h
>
>
> The latest version of the java driver 4.19.0 is using the deprecated LZ4
> compression setting of `chunk_length_kb` when it should be using
> `chunk_length_in_kb`. This works fine with Cassandra 4.1 but will fail with
> Cassandra 5.0.
>
> In RelationOptions.java:
> {code:java}
> @NonNull
> @CheckReturnValue
> default SelfT withCompression(
> @NonNull String compressionAlgorithmName, int chunkLengthKB, double
> crcCheckChance) {
> return withOption(
> "compression",
> ImmutableMap.of(
> "class",
> compressionAlgorithmName,
> "chunk_length_kb",
> chunkLengthKB,
> "crc_check_chance",
> crcCheckChance));
> }{code}
>
>
> How to reproduce:
>
> {code:java}
> client.execute(SchemaBuilder.createTable("new_table")
> .ifNotExists()
> .withPartitionKey("id", DataTypes.BIGINT)
> .withColumn("some_column", DataTypes.DOUBLE)
> .withLZ4Compression(64, 1.0)
> .build()) {code}
> Stack trace:
> {code:java}
> com.datastax.oss.driver.api.core.servererrors.InvalidConfigurationInQueryException:
> Unknown compression options chunk_length_kb
> at
> com.datastax.oss.driver.api.core.servererrors.InvalidConfigurationInQueryException.copy(InvalidConfigurationInQueryException.java:54)
> at
> com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:151)
> at
> com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProcessor.process(CqlRequestSyncProcessor.java:55)
> at
> com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProcessor.process(CqlRequestSyncProcessor.java:32)
> at
> com.datastax.oss.driver.internal.core.session.DefaultSession.execute(DefaultSession.java:234)
> at
> com.datastax.oss.driver.api.core.cql.SyncCqlSession.execute(SyncCqlSession.java:56){code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]