Skip to content

Commit

Permalink
chore: add some log (#16863)
Browse files Browse the repository at this point in the history
* chore: add some log

* remove flood log

* add log
  • Loading branch information
SkyFan2002 authored Nov 17, 2024
1 parent 93eb1e3 commit 55cef11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/query/storages/common/cache/src/read/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

use databend_common_exception::Result;

#[derive(Debug)]
pub struct LoadParams {
pub location: String,
pub len_hint: Option<u64>,
Expand Down
1 change: 1 addition & 0 deletions src/query/storages/fuse/src/io/snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ impl SnapshotsIO {
ver,
put_cache: true,
};
info!("read_snapshot will read: {:?}", load_params);
let snapshot = reader.read(&load_params).await?;
Ok((snapshot, ver))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use std::sync::Arc;

use databend_common_catalog::plan::DataSourcePlan;
use databend_common_catalog::table::Table;
use databend_common_catalog::table_args::TableArgs;
use databend_common_catalog::table_context::TableContext;
use databend_common_exception::ErrorCode;
Expand Down Expand Up @@ -173,6 +174,10 @@ async fn get_time_travel_size(storage_prefix: &str, op: &Operator) -> Result<u64
}

async fn calc_tbl_size(tbl: &FuseTable) -> Result<(u64, u64)> {
info!(
"fuse_time_travel_size start calc_tbl_size:{}",
tbl.get_table_info().desc
);
let operator = tbl.get_operator();
let storage_prefix = tbl.get_storage_prefix();
let start = std::time::Instant::now();
Expand All @@ -182,6 +187,7 @@ async fn calc_tbl_size(tbl: &FuseTable) -> Result<(u64, u64)> {
let latest_snapshot_size = match snapshot_location {
Some(snapshot_location) => {
let start = std::time::Instant::now();
info!("fuse_time_travel_size will read: {}", snapshot_location);
let (snapshot, _) = SnapshotsIO::read_snapshot(snapshot_location, operator).await?;
info!("read_snapshot cost: {:?}", start.elapsed());
snapshot.summary.compressed_byte_size + snapshot.summary.index_size
Expand Down

0 comments on commit 55cef11

Please sign in to comment.