From ba19cd2d9512456e6172bae9ee1eb1e656901358 Mon Sep 17 00:00:00 2001 From: kamille Date: Thu, 3 Aug 2023 16:48:04 +0800 Subject: [PATCH] add `bucket_create_parallelism` to `NamespaceConfig`. --- analytic_engine/src/lib.rs | 6 ++++++ wal/src/table_kv_impl/namespace.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/analytic_engine/src/lib.rs b/analytic_engine/src/lib.rs index 9168f019c0..894d0a1558 100644 --- a/analytic_engine/src/lib.rs +++ b/analytic_engine/src/lib.rs @@ -179,6 +179,7 @@ pub struct ManifestNamespaceConfig { pub init_scan_batch_size: i32, pub clean_scan_timeout: ReadableDuration, pub clean_scan_batch_size: usize, + pub bucket_create_parallelism: usize, } impl Default for ManifestNamespaceConfig { @@ -192,6 +193,7 @@ impl Default for ManifestNamespaceConfig { init_scan_batch_size: namespace_config.init_scan_batch_size, clean_scan_timeout: namespace_config.clean_scan_timeout, clean_scan_batch_size: namespace_config.clean_scan_batch_size, + bucket_create_parallelism: namespace_config.bucket_create_parallelism, } } } @@ -206,6 +208,7 @@ impl From for NamespaceConfig { init_scan_batch_size: manifest_config.init_scan_batch_size, clean_scan_timeout: manifest_config.clean_scan_timeout, clean_scan_batch_size: manifest_config.clean_scan_batch_size, + bucket_create_parallelism: manifest_config.bucket_create_parallelism, } } } @@ -227,6 +230,7 @@ pub struct WalNamespaceConfig { pub ttl: ReadableDuration, pub init_scan_timeout: ReadableDuration, pub init_scan_batch_size: i32, + pub bucket_create_parallelism: usize, } impl Default for WalNamespaceConfig { @@ -239,6 +243,7 @@ impl Default for WalNamespaceConfig { ttl: namespace_config.ttl.unwrap(), init_scan_timeout: namespace_config.init_scan_timeout, init_scan_batch_size: namespace_config.init_scan_batch_size, + bucket_create_parallelism: namespace_config.bucket_create_parallelism, } } } @@ -251,6 +256,7 @@ impl From for NamespaceConfig { ttl: Some(wal_config.ttl), init_scan_timeout: wal_config.init_scan_timeout, init_scan_batch_size: wal_config.init_scan_batch_size, + bucket_create_parallelism: wal_config.bucket_create_parallelism, ..Default::default() } } diff --git a/wal/src/table_kv_impl/namespace.rs b/wal/src/table_kv_impl/namespace.rs index 104b00f2d4..0c719e558e 100644 --- a/wal/src/table_kv_impl/namespace.rs +++ b/wal/src/table_kv_impl/namespace.rs @@ -1237,7 +1237,7 @@ impl TableOperator { let wal_shard_num_per_group = wal_shard_num / wal_shard_group_num; let wal_shard_groups = wal_shards .chunks(wal_shard_num_per_group) - .map(|a| a.to_owned()) + .map(|group| group.to_owned()) .collect::>(); let (tx, rx) = std::sync::mpsc::channel(); let stop = Arc::new(AtomicBool::new(false));