Skip to content

Commit c3ea489

Browse files
committed
chore: add rows and bytes to flush success log
Signed-off-by: evenyag <[email protected]>
1 parent ac5822b commit c3ea489

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/mito2/src/flush.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,13 +364,22 @@ impl RegionFlushTask {
364364
FLUSH_BYTES_TOTAL.inc_by(flushed_bytes);
365365
}
366366

367-
let file_ids: Vec<_> = file_metas.iter().map(|f| f.file_id).collect();
367+
let mut file_ids = Vec::with_capacity(file_metas.len());
368+
let mut total_rows = 0;
369+
let mut total_bytes = 0;
370+
for meta in &file_metas {
371+
file_ids.push(meta.file_id);
372+
total_rows += meta.num_rows;
373+
total_bytes += meta.file_size;
374+
}
368375
info!(
369-
"Successfully flush memtables, region: {}, reason: {}, files: {:?}, series count: {}, cost: {:?}, metrics: {:?}",
376+
"Successfully flush memtables, region: {}, reason: {}, files: {:?}, series count: {}, total_rows: {}, total_bytes: {}, cost: {:?}, metrics: {:?}",
370377
self.region_id,
371378
self.reason.as_str(),
372379
file_ids,
373380
series_count,
381+
total_rows,
382+
total_bytes,
374383
timer.stop_and_record(),
375384
flush_metrics,
376385
);

0 commit comments

Comments
 (0)