File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/query/service/src/servers/admin/v1 Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,17 @@ async fn load_tenant_tables_stats(tenant: &Tenant) -> Result<TenantTablesStatsRe
63
63
64
64
let databases = catalog. list_databases ( tenant) . await ?;
65
65
66
- let database_count = databases . len ( ) as u64 ;
66
+ let mut database_count = 0 ;
67
67
let mut internal_stats: BTreeMap < String , TenantTableStatsInfo > = BTreeMap :: new ( ) ;
68
68
let mut external_stats: BTreeMap < String , TenantTableStatsInfo > = BTreeMap :: new ( ) ;
69
69
let mut warnings: Vec < String > = vec ! [ ] ;
70
70
71
71
for database in databases {
72
+ let db_name = database. name ( ) . to_lowercase ( ) ;
73
+ if db_name == "information_schema" || db_name == "system" {
74
+ continue ;
75
+ }
76
+ database_count += 1 ;
72
77
let tables = match catalog. list_tables ( tenant, database. name ( ) ) . await {
73
78
Ok ( v) => v,
74
79
Err ( err) => {
@@ -83,7 +88,7 @@ async fn load_tenant_tables_stats(tenant: &Tenant) -> Result<TenantTablesStatsRe
83
88
} ;
84
89
for table in tables {
85
90
// local tables are not included in the stats
86
- if ! matches ! ( table. distribution_level( ) , DistributionLevel :: Local ) {
91
+ if matches ! ( table. distribution_level( ) , DistributionLevel :: Local ) {
87
92
continue ;
88
93
}
89
94
let engine = table. engine ( ) . to_string ( ) ;
You can’t perform that action at this time.
0 commit comments