mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Merge pull request #57793 from ClickHouse/rename-system-table
Rename `system.async_loader` into `system.asynchronous_loader`
This commit is contained in:
commit
3634b949a8
@ -1683,7 +1683,7 @@ Default value: `0.5`.
|
|||||||
|
|
||||||
Asynchronous loading of databases and tables.
|
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.
|
If `false`, all databases are loaded when the server starts.
|
||||||
|
|
||||||
|
@ -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`.
|
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
|
``` sql
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM system.async_loader
|
FROM system.asynchronous_loader
|
||||||
FORMAT Vertical
|
FORMAT Vertical
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
```
|
```
|
@ -362,7 +362,7 @@ public:
|
|||||||
bool is_executing = false;
|
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<JobState> getJobStates() const;
|
std::vector<JobState> getJobStates() const;
|
||||||
|
|
||||||
// For deadlock resolution. Should not be used directly.
|
// For deadlock resolution. Should not be used directly.
|
||||||
|
@ -1000,7 +1000,7 @@ TEST(AsyncLoader, SubJobs)
|
|||||||
std::atomic<int> jobs_left;
|
std::atomic<int> jobs_left;
|
||||||
// It is a good practice to keep load task inside the component:
|
// It is a good practice to keep load task inside the component:
|
||||||
// 1) to make sure it outlives its load jobs;
|
// 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;
|
LoadTaskPtr load_task;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1070,7 +1070,7 @@ TEST(AsyncLoader, RecursiveJob)
|
|||||||
std::atomic<int> jobs_left;
|
std::atomic<int> jobs_left;
|
||||||
// It is a good practice to keep load task inside the component:
|
// It is a good practice to keep load task inside the component:
|
||||||
// 1) to make sure it outlives its load jobs;
|
// 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;
|
LoadTaskPtr load_task;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ namespace DB
|
|||||||
|
|
||||||
class Context;
|
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<StorageSystemAsyncLoader>
|
class StorageSystemAsyncLoader final : public IStorageSystemOneBlock<StorageSystemAsyncLoader>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -204,7 +204,7 @@ void attachSystemTablesServer(ContextPtr context, IDatabase & system_database, b
|
|||||||
attach<StorageSystemRemoteDataPaths>(context, system_database, "remote_data_paths");
|
attach<StorageSystemRemoteDataPaths>(context, system_database, "remote_data_paths");
|
||||||
attach<StorageSystemCertificates>(context, system_database, "certificates");
|
attach<StorageSystemCertificates>(context, system_database, "certificates");
|
||||||
attach<StorageSystemNamedCollections>(context, system_database, "named_collections");
|
attach<StorageSystemNamedCollections>(context, system_database, "named_collections");
|
||||||
attach<StorageSystemAsyncLoader>(context, system_database, "async_loader");
|
attach<StorageSystemAsyncLoader>(context, system_database, "asynchronous_loader");
|
||||||
attach<StorageSystemUserProcesses>(context, system_database, "user_processes");
|
attach<StorageSystemUserProcesses>(context, system_database, "user_processes");
|
||||||
attach<StorageSystemJemallocBins>(context, system_database, "jemalloc_bins");
|
attach<StorageSystemJemallocBins>(context, system_database, "jemalloc_bins");
|
||||||
attach<StorageSystemS3Queue>(context, system_database, "s3queue");
|
attach<StorageSystemS3Queue>(context, system_database, "s3queue");
|
||||||
|
@ -3,7 +3,7 @@ set -e
|
|||||||
|
|
||||||
if [ "$1" == "--help" ] || [ -z "$1" ]; then
|
if [ "$1" == "--help" ] || [ -z "$1" ]; then
|
||||||
cat <<EOF >&2
|
cat <<EOF >&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
|
USAGE: async_loader_graph CLICKHOUSE_CLIENT CLIENT_OPTIONS
|
||||||
EXAMPLES:
|
EXAMPLES:
|
||||||
$ async_loader_graph clickhouse-client > async_loader.svg
|
$ async_loader_graph clickhouse-client > async_loader.svg
|
||||||
@ -18,7 +18,7 @@ CLICKHOUSE_CLIENT="$@"
|
|||||||
echo 'digraph {'
|
echo 'digraph {'
|
||||||
echo 'rankdir=LR;'
|
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 '
|
| jq -r '
|
||||||
.data[]
|
.data[]
|
||||||
| { "FgLoad": "box", "BgLoad": "hexagon", "BgStartup": "ellipse" } as $shape
|
| { "FgLoad": "box", "BgLoad": "hexagon", "BgStartup": "ellipse" } as $shape
|
||||||
|
Loading…
Reference in New Issue
Block a user