From 5608035074aa53cf3a7a475051273c953f0f1d26 Mon Sep 17 00:00:00 2001 From: Lanqing Yang Date: Thu, 16 Nov 2023 22:27:13 -0800 Subject: [PATCH] fix!: improve user experience on setting compression type (#2765) * fixes: https://github.com/GreptimeTeam/greptimedb/issues/2758 Chore: improve user experience on setting compression type * Update src/common/datasource/src/compression.rs Co-authored-by: Yingwen --------- Co-authored-by: Yingwen --- config/datanode.example.toml | 2 +- src/common/datasource/src/compression.rs | 2 ++ tests-integration/tests/http.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/datanode.example.toml b/config/datanode.example.toml index 7793e148ac4c..666430d48175 100644 --- a/config/datanode.example.toml +++ b/config/datanode.example.toml @@ -92,7 +92,7 @@ worker_request_batch_size = 64 # Number of meta action updated to trigger a new checkpoint for the manifest manifest_checkpoint_distance = 10 # Manifest compression type -manifest_compress_type = "Uncompressed" +manifest_compress_type = "uncompressed" # Max number of running background jobs max_background_jobs = 4 # Interval to auto flush a region if it has not flushed yet. diff --git a/src/common/datasource/src/compression.rs b/src/common/datasource/src/compression.rs index 21c566172cbc..77b40f8e9c62 100644 --- a/src/common/datasource/src/compression.rs +++ b/src/common/datasource/src/compression.rs @@ -26,7 +26,9 @@ use tokio::io::{AsyncRead, AsyncWriteExt, BufReader}; use tokio_util::io::{ReaderStream, StreamReader}; use crate::error::{self, Error, Result}; + #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, EnumIter, Serialize, Deserialize)] +#[serde(rename_all = "lowercase")] pub enum CompressionType { /// Gzip-ed file Gzip, diff --git a/tests-integration/tests/http.rs b/tests-integration/tests/http.rs index 574334de00d7..f6c5fb7e737c 100644 --- a/tests-integration/tests/http.rs +++ b/tests-integration/tests/http.rs @@ -736,7 +736,7 @@ num_workers = {} worker_channel_size = 128 worker_request_batch_size = 64 manifest_checkpoint_distance = 10 -manifest_compress_type = "Uncompressed" +manifest_compress_type = "uncompressed" max_background_jobs = 4 auto_flush_interval = "30m" global_write_buffer_size = "1GiB"