Skip to content

Commit b50fc83

Browse files
committed
tweak logs of vacuum all
1 parent 610e32b commit b50fc83

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/query/service/src/table_functions/fuse_vacuum2/fuse_vacuum2_table.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,21 +183,26 @@ impl FuseVacuum2Table {
183183
) -> Result<Vec<String>> {
184184
let tenant_id = ctx.get_tenant();
185185
let dbs = catalog.list_databases(&tenant_id).await?;
186-
for db in dbs {
186+
let num_db = dbs.len();
187+
188+
for (idx_db, db) in dbs.iter().enumerate() {
187189
if db.engine().to_uppercase() == "SYSTEM" {
188190
info!("Bypass system database [{}]", db.name());
189191
continue;
190192
}
191193

192-
info!("Processing db {}", db.name());
194+
info!("Processing db {}, {}/{}", db.name(), idx_db + 1, num_db);
193195
let tables = catalog.list_tables(&tenant_id, db.name()).await?;
194196
info!("Found {} tables in db {}", tables.len(), db.name());
195197

196-
for table in tables {
198+
let num_tbl = tables.len();
199+
for (idx_tbl, table) in tables.iter().enumerate() {
197200
info!(
198-
"Processing table {}.{}",
201+
"Processing table {}.{}, {}/{}",
199202
db.name(),
200-
table.get_table_info().name
203+
table.get_table_info().name,
204+
idx_tbl + 1,
205+
num_tbl
201206
);
202207

203208
let Ok(tbl) = FuseTable::try_from_table(table.as_ref()) else {

0 commit comments

Comments
 (0)