Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyass committed Sep 27, 2023
1 parent af34496 commit 0f285ee
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0f285ee

Please sign in to comment.