Skip to content

Commit 8b375f0

Browse files
authored
chore: improve logging for FUSE change tracking and partitions pruning (#18229)
refactor: improve logging for FUSE change tracking and partitions pruning - Add node ID and segment count to pruning log messages for better traceability in distributed environments - Tweak log prefix tags ([FUSE-CHANGE-TRACKING], [FUSE-PARTITIONS]) for easier log filtering
1 parent cae80b0 commit 8b375f0

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

src/query/storages/fuse/src/operations/changes.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,12 @@ impl FuseTable {
299299
let bloom_index_cols = self.bloom_index_cols();
300300
let ngram_args =
301301
Self::create_ngram_index_args(&self.table_info.meta, &self.table_info.meta.schema)?;
302+
303+
info!(
304+
"[FUSE-CHANGE-TRACKING] prune snapshot block start, at node {}",
305+
ctx.get_cluster().local_id,
306+
);
307+
302308
let mut pruner = FusePruner::create_with_pages(
303309
&ctx,
304310
self.get_operator(),
@@ -315,9 +321,10 @@ impl FuseTable {
315321
let pruning_stats = pruner.pruning_stats();
316322

317323
info!(
318-
"prune snapshot block end, final block numbers:{}, cost:{:?}",
324+
"[FUSE-CHANGE-TRACKING] prune snapshot block end, final block numbers:{}, cost:{:?}, at node {}",
319325
block_metas.len(),
320-
start.elapsed()
326+
start.elapsed(),
327+
ctx.get_cluster().local_id,
321328
);
322329

323330
let block_metas = block_metas

src/query/storages/fuse/src/operations/read_partitions.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,12 @@ impl FuseTable {
345345
segments_location: Vec<SegmentLocation>,
346346
summary: usize,
347347
) -> Result<(PartStatistics, Partitions)> {
348+
let num_segments_to_prune = segments_location.len();
348349
let start = Instant::now();
349350
info!(
350-
"segment numbers" = segments_location.len();
351-
"prune snapshot block start"
351+
"[FUSE-PARTITIONS] prune snapshot block start, {} segment to be processed, at node {}",
352+
num_segments_to_prune,
353+
ctx.get_cluster().local_id,
352354
);
353355

354356
let dal = self.operator.clone();
@@ -378,9 +380,11 @@ impl FuseTable {
378380
let pruning_stats = pruner.pruning_stats();
379381

380382
info!(
381-
"[FUSE-PARTITIONS] prune snapshot block end, final block numbers:{}, cost:{:?}",
383+
"[FUSE-PARTITIONS] prune snapshot block end, final block numbers:{}, out of {} segments, cost:{:?}, at node {}",
382384
block_metas.len(),
383-
start.elapsed()
385+
num_segments_to_prune,
386+
start.elapsed(),
387+
ctx.get_cluster().local_id,
384388
);
385389

386390
let block_metas = block_metas

0 commit comments

Comments
 (0)