[ https://issues.apache.org/jira/browse/CASSJAVA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17941544#comment-17941544 ]
Thomas Steinmaurer commented on CASSJAVA-89: -------------------------------------------- Once the chunk length param is fixed / renamed, it likely fails for _crc_check_chance_ as well, due to https://issues.apache.org/jira/browse/CASSANDRA-18872. > 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 > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org