From 0f285ee72734a1aca8d1d51055e68c2e749c8e0a Mon Sep 17 00:00:00 2001 From: zhyass Date: Tue, 26 Sep 2023 10:48:45 +0800 Subject: [PATCH] remove unused --- .../mutation/compact/block_compact_mutator.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/query/storages/fuse/src/operations/mutation/compact/block_compact_mutator.rs b/src/query/storages/fuse/src/operations/mutation/compact/block_compact_mutator.rs index b05f3044c7152..4febfca02427e 100644 --- a/src/query/storages/fuse/src/operations/mutation/compact/block_compact_mutator.rs +++ b/src/query/storages/fuse/src/operations/mutation/compact/block_compact_mutator.rs @@ -226,9 +226,9 @@ impl BlockCompactMutator { )?); let semaphore = Arc::new(Semaphore::new(max_concurrency)); - let mut remain = lazy_parts.len() % max_concurrency; - let batch_size = lazy_parts.len() / max_concurrency; - let mut works = Vec::with_capacity(max_concurrency); + let mut remain = lazy_parts.len() % max_threads; + let batch_size = lazy_parts.len() / max_threads; + let mut works = Vec::with_capacity(max_threads); while !lazy_parts.is_empty() { let gap_size = std::cmp::min(1, remain); @@ -272,16 +272,15 @@ impl BlockCompactMutator { let res = worker?; parts.extend(res); } - let elapsed_time = start.elapsed().as_millis() as u64; + // Status. { - let status = format!( + let elapsed_time = start.elapsed().as_millis() as u64; + ctx.set_status_info(&format!( "compact: end to build compact parts:{}, cost:{} ms", parts.len(), elapsed_time, - ); - ctx.set_status_info(&status); - log::info!("{}", status); + )); metrics_inc_compact_block_build_task_milliseconds(elapsed_time); } Ok(parts)