From b6ff044b350be7a3f2cad76d2e150945283c4a6e Mon Sep 17 00:00:00 2001 From: zhya Date: Wed, 27 Nov 2024 16:02:25 +0800 Subject: [PATCH] chore(storage): hook compact avoid scan all segments (#16954) --- .../src/operations/mutation/mutator/block_compact_mutator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/storages/fuse/src/operations/mutation/mutator/block_compact_mutator.rs b/src/query/storages/fuse/src/operations/mutation/mutator/block_compact_mutator.rs index df6bcd5e8633..4e487b41d487 100644 --- a/src/query/storages/fuse/src/operations/mutation/mutator/block_compact_mutator.rs +++ b/src/query/storages/fuse/src/operations/mutation/mutator/block_compact_mutator.rs @@ -168,7 +168,7 @@ impl BlockCompactMutator { self.ctx.set_status_info(&status); } - if is_end { + if is_end || segment_idx >= num_segment_limit { break; } }