mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 11:32:03 +00:00
Exclude internal databases from async metric "NumberOfDatabases"
This commit is contained in:
parent
539cb6f3c1
commit
44815240f5
@ -218,7 +218,11 @@ void ServerAsynchronousMetrics::updateImpl(AsynchronousMetricValues & new_values
|
|||||||
|
|
||||||
size_t max_part_count_for_partition = 0;
|
size_t max_part_count_for_partition = 0;
|
||||||
|
|
||||||
size_t number_of_databases = databases.size();
|
size_t number_of_databases = 0;
|
||||||
|
for (auto [db_name, _] : databases)
|
||||||
|
if (db_name != DatabaseCatalog::TEMPORARY_DATABASE)
|
||||||
|
++number_of_databases; /// filter out the internal database for temporary tables, system table "system.databases" behaves the same way
|
||||||
|
|
||||||
size_t total_number_of_tables = 0;
|
size_t total_number_of_tables = 0;
|
||||||
|
|
||||||
size_t total_number_of_bytes = 0;
|
size_t total_number_of_bytes = 0;
|
||||||
|
@ -80,7 +80,7 @@ void StorageSystemDatabases::fillData(MutableColumns & res_columns, ContextPtr c
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (database_name == DatabaseCatalog::TEMPORARY_DATABASE)
|
if (database_name == DatabaseCatalog::TEMPORARY_DATABASE)
|
||||||
continue; /// We don't want to show the internal database for temporary tables in system.databases
|
continue; /// filter out the internal database for temporary tables in system.databases, asynchronous metric "NumberOfDatabases" behaves the same way
|
||||||
|
|
||||||
res_columns[0]->insert(database_name);
|
res_columns[0]->insert(database_name);
|
||||||
res_columns[1]->insert(database->getEngineName());
|
res_columns[1]->insert(database->getEngineName());
|
||||||
|
Loading…
Reference in New Issue
Block a user