You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (CurrentMetrics::get(CurrentMetrics::AttachedTable) > static_cast<Int64>(shared->max_table_num_to_warn))
1328
-
common_warnings[Context::WarningType::MAX_ATTACHED_TABLES] = PreformattedMessage::create("The number of attached tables is more than {}.", shared->max_table_num_to_warn.load());
1329
-
if (CurrentMetrics::get(CurrentMetrics::AttachedView) > static_cast<Int64>(shared->max_view_num_to_warn))
1330
-
common_warnings[Context::WarningType::MAX_ATTACHED_VIEWS] = PreformattedMessage::create("The number of attached views is more than {}.", shared->max_view_num_to_warn.load());
1331
-
if (CurrentMetrics::get(CurrentMetrics::AttachedDictionary) > static_cast<Int64>(shared->max_dictionary_num_to_warn))
1332
-
common_warnings[Context::WarningType::MAX_ATTACHED_DICTIONARIES] = PreformattedMessage::create("The number of attached dictionaries is more than {}.", shared->max_dictionary_num_to_warn.load());
1333
-
if (CurrentMetrics::get(CurrentMetrics::AttachedDatabase) > static_cast<Int64>(shared->max_database_num_to_warn))
1334
-
common_warnings[Context::WarningType::MAX_ATTACHED_DATABASES] = PreformattedMessage::create("The number of attached databases is more than {}.", shared->max_database_num_to_warn.load());
1335
-
if (CurrentMetrics::get(CurrentMetrics::PartsActive) > static_cast<Int64>(shared->max_part_num_to_warn))
1336
-
common_warnings[Context::WarningType::MAX_ACTIVE_PARTS] = PreformattedMessage::create("The number of active parts is more than {}.", shared->max_part_num_to_warn.load());
1332
+
1333
+
auto attached_tables = CurrentMetrics::get(CurrentMetrics::AttachedTable);
1334
+
auto attached_views = CurrentMetrics::get(CurrentMetrics::AttachedView);
1335
+
auto attached_dictionaries = CurrentMetrics::get(CurrentMetrics::AttachedDictionary);
1336
+
auto attached_databases = CurrentMetrics::get(CurrentMetrics::AttachedDatabase);
1337
+
auto active_parts = CurrentMetrics::get(CurrentMetrics::PartsActive);
1338
+
1339
+
if (attached_tables > static_cast<Int64>(shared->max_table_num_to_warn))
1340
+
{
1341
+
if (auto limit = shared->server_settings[ServerSetting::max_table_num_to_throw]; limit > shared->max_table_num_to_warn.load())
"The number of attached dictionaries ({}) exceeds the warning limit of {}. You will not be able to create new dictionaries once the limit of {} is reached.",
"The number of attached databases ({}) exceeds the warning limit of {}. You will not be able to create new databases once the limit of {} is reached.",
0 commit comments