Skip to content

Commit

Permalink
add bucket_create_parallelism to NamespaceConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Aug 3, 2023
1 parent 258124b commit ba19cd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions analytic_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
}
}
}
Expand All @@ -206,6 +208,7 @@ impl From<ManifestNamespaceConfig> 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,
}
}
}
Expand All @@ -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 {
Expand All @@ -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,
}
}
}
Expand All @@ -251,6 +256,7 @@ impl From<WalNamespaceConfig> 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()
}
}
Expand Down
2 changes: 1 addition & 1 deletion wal/src/table_kv_impl/namespace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>();
let (tx, rx) = std::sync::mpsc::channel();
let stop = Arc::new(AtomicBool::new(false));
Expand Down

0 comments on commit ba19cd2

Please sign in to comment.