Skip to content

Commit ea48b12

Browse files
authored
chore(cubestore): RocksStore - enable zstd compression codec (#7149)
1 parent 49caef3 commit ea48b12

File tree

6 files changed

+19
-12
lines changed

6 files changed

+19
-12
lines changed

rust/cubestore/Cargo.lock

Lines changed: 12 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/cubestore/cubestore-sql-tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ tar = "0.4.38"
5353

5454
[dev-dependencies]
5555
criterion = { version = "0.4.0", features = ["async_tokio", "html_reports"] }
56-
rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["bzip2", "snappy"] }
56+
rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["zstd", "snappy"] }
5757

5858
[[bench]]
5959
name = "in_process"

rust/cubestore/cubestore/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ simple_logger = "1.7.0"
4242
async-trait = "0.1.36"
4343
actix-rt = "2.7.0"
4444
regex = "1.3.9"
45-
rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["bzip2", "snappy"] }
45+
rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["zstd", "snappy"] }
4646
uuid = { version = "0.8", features = ["serde", "v4"] }
4747
num = "0.3.0"
4848
enum_primitive = "0.1.1"

rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ impl RocksStoreDetails for RocksCacheStoreDetails {
104104
opts.set_max_subcompactions(rocksdb_config.max_subcompactions);
105105
opts.set_block_based_table_factory(&block_opts);
106106
opts.set_compression_type(rocksdb_config.compression_type);
107+
opts.set_bottommost_compression_type(rocksdb_config.bottommost_compression_type);
107108
opts.increase_parallelism(rocksdb_config.parallelism as i32);
108109

109110
DB::open(&opts, path)

rust/cubestore/cubestore/src/metastore/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,7 @@ impl RocksStoreDetails for RocksMetaStoreDetails {
12801280
opts.set_max_subcompactions(rocksdb_config.max_subcompactions);
12811281
opts.set_block_based_table_factory(&block_opts);
12821282
opts.set_compression_type(rocksdb_config.compression_type);
1283+
opts.set_bottommost_compression_type(rocksdb_config.bottommost_compression_type);
12831284
opts.increase_parallelism(rocksdb_config.parallelism as i32);
12841285

12851286
DB::open(&opts, path)

rust/cubestore/cubestore/src/metastore/rocks_store.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ pub struct RocksStoreConfig {
722722
pub checksum_type: RocksStoreChecksumType,
723723
pub cache_capacity: usize,
724724
pub compression_type: RocksStoreCompressionType,
725+
pub bottommost_compression_type: RocksStoreCompressionType,
725726
// Sets maximum number of concurrent background jobs (compactions and flushes).
726727
pub max_background_jobs: u32,
727728
// Sets maximum number of threads that will concurrently perform a compaction job by breaking
@@ -738,6 +739,7 @@ impl RocksStoreConfig {
738739
checksum_type: RocksStoreChecksumType::XXH3,
739740
cache_capacity: 8 * 1024 * 1024,
740741
compression_type: RocksStoreCompressionType::None,
742+
bottommost_compression_type: RocksStoreCompressionType::None,
741743
max_background_jobs: 2,
742744
// Default: 1 (i.e. no subcompactions)
743745
max_subcompactions: 1,
@@ -752,6 +754,7 @@ impl RocksStoreConfig {
752754
checksum_type: RocksStoreChecksumType::XXH3,
753755
cache_capacity: 8 * 1024 * 1024,
754756
compression_type: RocksStoreCompressionType::None,
757+
bottommost_compression_type: RocksStoreCompressionType::None,
755758
max_background_jobs: 2,
756759
// Default: 1 (i.e. no subcompactions)
757760
max_subcompactions: 1,

0 commit comments

Comments
 (0)