You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Eunsu Kim <eu...@gmail.com> on 2022/09/20 06:34:17 UTC

Change the compression algorithm on a production table at runtime

Hi all

According to https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlAlterTable.html <https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlAlterTable.html>, it can be very problematic to modify the Compaction strategy on a table running in production.

Similarly, is it risky to change the compression algorithm to existing table in production?

Currently the table is using DeflateCompressor but I want to change it to LZ4Compressor(for performance) Cassandra version is 3.11.10.


Thank you in advance.

Re: Change the compression algorithm on a production table at runtime

Posted by "C. Scott Andreas" <sc...@paradoxica.net>.
Thanks for reaching out.

Changing the compressor for a table is both safe and common. Future flushes / compactions will use the new codec as SSTables are written, and SSTables currently present on disk will remain readable with the previous codec.

You may also want to take a look at the Zstandard codec once you’ve upgraded to Cassandra 4.0+, which offers a great balance between compression ratio and throughout.

> On Sep 19, 2022, at 11:34 PM, Eunsu Kim <eu...@gmail.com> wrote:
> 
> Hi all
> 
> According to https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlAlterTable.html, it can be very problematic to modify the Compaction strategy on a table running in production.
> 
> Similarly, is it risky to change the compression algorithm to existing table in production?
> 
> Currently the table is using DeflateCompressor but I want to change it to LZ4Compressor(for performance) Cassandra version is 3.11.10.
> 
> 
> Thank you in advance.