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
6363
6464 let databases = catalog. list_databases ( tenant) . await ?;
6565
66- let database_count = databases . len ( ) as u64 ;
66+ let mut database_count = 0 ;
6767 let mut internal_stats: BTreeMap < String , TenantTableStatsInfo > = BTreeMap :: new ( ) ;
6868 let mut external_stats: BTreeMap < String , TenantTableStatsInfo > = BTreeMap :: new ( ) ;
6969 let mut warnings: Vec < String > = vec ! [ ] ;
7070
7171 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 ;
7277 let tables = match catalog. list_tables ( tenant, database. name ( ) ) . await {
7378 Ok ( v) => v,
7479 Err ( err) => {
@@ -83,7 +88,7 @@ async fn load_tenant_tables_stats(tenant: &Tenant) -> Result<TenantTablesStatsRe
8388 } ;
8489 for table in tables {
8590 // local tables are not included in the stats
86- if ! matches ! ( table. distribution_level( ) , DistributionLevel :: Local ) {
91+ if matches ! ( table. distribution_level( ) , DistributionLevel :: Local ) {
8792 continue ;
8893 }
8994 let engine = table. engine ( ) . to_string ( ) ;
You can’t perform that action at this time.
0 commit comments