Does modifying the column family compression algorithm at each level in a running TiDB cluster affect data read and write operations?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 运行中的TiDB集群,修改每层的列簇压缩算法,是否影响数据读写?

| username: OnTheRoad

Will modifying the compression-per-level parameter in a running TiDB cluster affect read and write operations? How does the new compression algorithm handle existing SST files in levels L1, L2, L3, etc.? Are they decompressed and then recompressed one by one?

| username: ddhe9527 | Original post link

Existing data will only be recompressed during compaction; otherwise, it remains as is. The purpose of compression is to save space, and the upper layers are not that large to begin with, so enabling compression doesn’t have much significance. Additionally, enabling compression affects both read and write performance, especially since data needs to be decompressed during reads.

| username: OnTheRoad | Original post link

If the compression algorithm is changed in the following layers, will the stored data be decompressed using the old algorithm and recompressed using the new algorithm in the background?

| username: ddhe9527 | Original post link

The new compression algorithm is used for re-compression during compaction.