From 57d7a58dbed32083772501beaf9e09e9233df872 Mon Sep 17 00:00:00 2001 From: serxa Date: Tue, 12 Dec 2023 16:55:27 +0000 Subject: [PATCH] Rename `system.async_loader` into `system.asynchronous_loader` --- .../operations/server-configuration-parameters/settings.md | 2 +- docs/en/operations/system-tables/async_loader.md | 6 +++--- src/Common/AsyncLoader.h | 2 +- src/Common/tests/gtest_async_loader.cpp | 4 ++-- src/Storages/System/StorageSystemAsyncLoader.h | 2 +- src/Storages/System/attachSystemTables.cpp | 2 +- utils/async_loader_graph | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index cc2692b8e02..f35e8c27f2d 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -1650,7 +1650,7 @@ Default value: `0.5`. Asynchronous loading of databases and tables. -If `true` all non-system databases with `Ordinary`, `Atomic` and `Replicated` engine will be loaded asynchronously after the ClickHouse server start up. See `system.async_loader` table, `tables_loader_background_pool_size` and `tables_loader_foreground_pool_size` server settings. Any query that tries to access a table, that is not yet loaded, will wait for exactly this table to be started up. If load job fails, query will rethrow an error (instead of shutting down the whole server in case of `async_load_databases = false`). The table that is waited for by at least one query will be loaded with higher priority. DDL queries on a database will wait for exactly that database to be started up. +If `true` all non-system databases with `Ordinary`, `Atomic` and `Replicated` engine will be loaded asynchronously after the ClickHouse server start up. See `system.asynchronous_loader` table, `tables_loader_background_pool_size` and `tables_loader_foreground_pool_size` server settings. Any query that tries to access a table, that is not yet loaded, will wait for exactly this table to be started up. If load job fails, query will rethrow an error (instead of shutting down the whole server in case of `async_load_databases = false`). The table that is waited for by at least one query will be loaded with higher priority. DDL queries on a database will wait for exactly that database to be started up. If `false`, all databases are loaded when the server starts. diff --git a/docs/en/operations/system-tables/async_loader.md b/docs/en/operations/system-tables/async_loader.md index 4e8651a6d3e..af9aa4ecd09 100644 --- a/docs/en/operations/system-tables/async_loader.md +++ b/docs/en/operations/system-tables/async_loader.md @@ -1,7 +1,7 @@ --- -slug: /en/operations/system-tables/async_loader +slug: /en/operations/system-tables/asynchronous_loader --- -# async_loader +# asynchronous_loader Contains information and status for recent asynchronous jobs (e.g. for tables loading). The table contains a row for every job. There is a tool for visualizing information from this table `utils/async_loader_graph`. @@ -9,7 +9,7 @@ Example: ``` sql SELECT * -FROM system.async_loader +FROM system.asynchronous_loader FORMAT Vertical LIMIT 1 ``` diff --git a/src/Common/AsyncLoader.h b/src/Common/AsyncLoader.h index 7b6e3ebfefe..95a2273a0f4 100644 --- a/src/Common/AsyncLoader.h +++ b/src/Common/AsyncLoader.h @@ -362,7 +362,7 @@ public: bool is_executing = false; }; - // For introspection and debug only, see `system.async_loader` table. + // For introspection and debug only, see `system.asynchronous_loader` table. std::vector getJobStates() const; // For deadlock resolution. Should not be used directly. diff --git a/src/Common/tests/gtest_async_loader.cpp b/src/Common/tests/gtest_async_loader.cpp index f2e741e4b9f..434c05fdb06 100644 --- a/src/Common/tests/gtest_async_loader.cpp +++ b/src/Common/tests/gtest_async_loader.cpp @@ -1000,7 +1000,7 @@ TEST(AsyncLoader, SubJobs) std::atomic jobs_left; // It is a good practice to keep load task inside the component: // 1) to make sure it outlives its load jobs; - // 2) to avoid removing load jobs from `system.async_loader` while we use the component + // 2) to avoid removing load jobs from `system.asynchronous_loader` while we use the component LoadTaskPtr load_task; }; @@ -1070,7 +1070,7 @@ TEST(AsyncLoader, RecursiveJob) std::atomic jobs_left; // It is a good practice to keep load task inside the component: // 1) to make sure it outlives its load jobs; - // 2) to avoid removing load jobs from `system.async_loader` while we use the component + // 2) to avoid removing load jobs from `system.asynchronous_loader` while we use the component LoadTaskPtr load_task; }; diff --git a/src/Storages/System/StorageSystemAsyncLoader.h b/src/Storages/System/StorageSystemAsyncLoader.h index 1a466904df7..28c17392d08 100644 --- a/src/Storages/System/StorageSystemAsyncLoader.h +++ b/src/Storages/System/StorageSystemAsyncLoader.h @@ -9,7 +9,7 @@ namespace DB class Context; -/// system.async_loader table. Takes data from context.getAsyncLoader() +/// system.asynchronous_loader table. Takes data from context.getAsyncLoader() class StorageSystemAsyncLoader final : public IStorageSystemOneBlock { public: diff --git a/src/Storages/System/attachSystemTables.cpp b/src/Storages/System/attachSystemTables.cpp index 2d7e728bbba..f6aaf298d09 100644 --- a/src/Storages/System/attachSystemTables.cpp +++ b/src/Storages/System/attachSystemTables.cpp @@ -207,7 +207,7 @@ void attachSystemTablesServer(ContextPtr context, IDatabase & system_database, b attach(context, system_database, "remote_data_paths"); attach(context, system_database, "certificates"); attach(context, system_database, "named_collections"); - attach(context, system_database, "async_loader"); + attach(context, system_database, "asynchronous_loader"); attach(context, system_database, "user_processes"); attach(context, system_database, "jemalloc_bins"); attach(context, system_database, "s3queue"); diff --git a/utils/async_loader_graph b/utils/async_loader_graph index 5bd4aba41ee..9c055dfa86e 100755 --- a/utils/async_loader_graph +++ b/utils/async_loader_graph @@ -3,7 +3,7 @@ set -e if [ "$1" == "--help" ] || [ -z "$1" ]; then cat <&2 -SELECT data from 'system.async_loader' table and render .svg graph of load jobs using 'dot' graphviz tool. +SELECT data from 'system.asynchronous_loader' table and render .svg graph of load jobs using 'dot' graphviz tool. USAGE: async_loader_graph CLICKHOUSE_CLIENT CLIENT_OPTIONS EXAMPLES: $ async_loader_graph clickhouse-client > async_loader.svg @@ -18,7 +18,7 @@ CLICKHOUSE_CLIENT="$@" echo 'digraph {' echo 'rankdir=LR;' -$CLICKHOUSE_CLIENT --query='select job, job_id, status, is_blocked, is_ready, is_executing, pool, dependencies from system.async_loader FORMAT JSON' \ +$CLICKHOUSE_CLIENT --query='select job, job_id, status, is_blocked, is_ready, is_executing, pool, dependencies from system.asynchronous_loader FORMAT JSON' \ | jq -r ' .data[] | { "FgLoad": "box", "BgLoad": "hexagon", "BgStartup": "ellipse" } as $shape