Skip to content

Commit 8204cff

Browse files
authored
chore: refine some fuse_time_travel_size related logs (#17515)
* chore: refine some time travle size logs * chore: log of loading snapshot hint file
1 parent 51f8017 commit 8204cff

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

src/query/storages/common/table_meta/src/table/table_prefix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
use std::fmt::Display;
1616

17-
/// Constructs the prefix path which covers all the data of of a give table identity
17+
/// Constructs the prefix path which covers all the data of a give table identity
1818
pub fn table_storage_prefix(database_id: impl Display, table_id: impl Display) -> String {
1919
format!("{}/{}", database_id, table_id)
2020
}
2121

22-
/// Constructs the prefix path which covers all the data of of a give table identity
22+
/// Constructs the prefix path which covers all the data of a give database identity
2323
pub fn database_storage_prefix(database_id: impl Display) -> String {
2424
format!("{}", database_id)
2525
}

src/query/storages/fuse/src/fuse_table.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,12 @@ impl FuseTable {
565565
return Ok(());
566566
}
567567

568+
info!(
569+
"extracting snapshot location of table {} with id {:?} from the last snapshot hint file.",
570+
table_info.desc,
571+
table_info.ident
572+
);
573+
568574
let snapshot_hint =
569575
Self::refresh_schema_from_hint(operator, storage_prefix, &table_info.desc)?;
570576

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ async fn try_read_legacy_hint(
102102
let begin_load_hint = Instant::now();
103103
let maybe_hint_content = operator.read(&hint_file_path).await;
104104
info!(
105-
"loaded last snapshot hint file [{}], time used {:?}",
105+
"{} load last snapshot hint file [{}], time used {:?}",
106+
if maybe_hint_content.is_ok() {
107+
"successfully"
108+
} else {
109+
"failed to"
110+
},
106111
hint_file_path,
107112
begin_load_hint.elapsed()
108113
);

src/query/storages/fuse/src/table_functions/fuse_time_travel_size.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,12 @@ impl SimpleArgFunc for FuseTimeTravelSize {
134134
if db.name() == "system" || db.name() == "information_schema" {
135135
continue;
136136
}
137+
138+
info!("loading tables from database : {}", db.name());
137139
let tables = match &args.table_name {
138140
Some(table_name) => {
139141
let start = std::time::Instant::now();
142+
info!("loading table {}", table_name);
140143
let table = db.get_table(table_name.as_str()).await?;
141144
info!("get_table cost: {:?}", start.elapsed());
142145
vec![table]

0 commit comments

Comments
 (0)