Updated doc of distributed_ddl_queue (#54192)

* Updated doc of distributed_ddl_queue

* Update docs/en/operations/system-tables/distributed_ddl_queue.md

Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>

* Update docs/en/operations/system-tables/distributed_ddl_queue.md

Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>

* Update docs/en/operations/system-tables/distributed_ddl_queue.md

Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>

---------

Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>
This commit is contained in:
Alejandro 2023-09-04 16:25:06 +01:00 committed by GitHub
parent e192d4c624
commit 5d6a2609c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,17 +8,21 @@ Contains information about [distributed ddl queries (ON CLUSTER clause)](../../s
Columns: Columns:
- `entry` ([String](../../sql-reference/data-types/string.md)) — Query id. - `entry` ([String](../../sql-reference/data-types/string.md)) — Query id.
- `host_name` ([String](../../sql-reference/data-types/string.md)) — Hostname. - `entry_version` ([Nullable(UInt8)](../../sql-reference/data-types/int-uint.md)) - Version of the entry
- `host_address` ([String](../../sql-reference/data-types/string.md)) — IP address that the Hostname resolves to. - `initiator_host` ([Nullable(String)](../../sql-reference/data-types/string.md)) - Host that initiated the DDL operation
- `port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — Host Port. - `initiator_port` ([Nullable(UInt16)](../../sql-reference/data-types/int-uint.md)) - Port used by the initiator
- `status` ([Enum8](../../sql-reference/data-types/enum.md)) — Status of the query.
- `cluster` ([String](../../sql-reference/data-types/string.md)) — Cluster name. - `cluster` ([String](../../sql-reference/data-types/string.md)) — Cluster name.
- `query` ([String](../../sql-reference/data-types/string.md)) — Query executed. - `query` ([String](../../sql-reference/data-types/string.md)) — Query executed.
- `initiator` ([String](../../sql-reference/data-types/string.md)) — Node that executed the query. - `settings` ([Map(String, String)](../../sql-reference/data-types/map.md)) - Settings used in the DDL operation
- `query_start_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — Query start time. - `query_create_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — Query created time.
- `host` ([String](../../sql-reference/data-types/string.md)) — Hostname
- `port` ([UInt16](../../sql-reference/data-types/int-uint.md)) — Host Port.
- `status` ([Enum8](../../sql-reference/data-types/enum.md)) — Status of the query.
- `exception_code` ([Enum8](../../sql-reference/data-types/enum.md)) — Exception code.
- `exception_text` ([Nullable(String)](../../sql-reference/data-types/string.md)) - Exception message
- `query_finish_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — Query finish time. - `query_finish_time` ([DateTime](../../sql-reference/data-types/datetime.md)) — Query finish time.
- `query_duration_ms` ([UInt64](../../sql-reference/data-types/int-uint.md)) — Duration of query execution (in milliseconds). - `query_duration_ms` ([UInt64](../../sql-reference/data-types/int-uint.md)) — Duration of query execution (in milliseconds).
- `exception_code` ([Enum8](../../sql-reference/data-types/enum.md)) — Exception code from [ClickHouse Keeper](../../operations/tips.md#zookeeper).
**Example** **Example**
@ -34,32 +38,38 @@ Query id: f544e72a-6641-43f1-836b-24baa1c9632a
Row 1: Row 1:
────── ──────
entry: query-0000000000 entry: query-0000000000
host_name: clickhouse01 entry_version: 5
host_address: 172.23.0.11 initiator_host: clickhouse01
port: 9000 initiator_port: 9000
status: Finished
cluster: test_cluster cluster: test_cluster
query: CREATE DATABASE test_db UUID '4a82697e-c85e-4e5b-a01e-a36f2a758456' ON CLUSTER test_cluster query: CREATE DATABASE test_db UUID '4a82697e-c85e-4e5b-a01e-a36f2a758456' ON CLUSTER test_cluster
initiator: clickhouse01:9000 settings: {'max_threads':'16','use_uncompressed_cache':'0'}
query_start_time: 2020-12-30 13:07:51 query_create_time: 2023-09-01 16:15:14
query_finish_time: 2020-12-30 13:07:51 host: clickhouse-01
query_duration_ms: 6 port: 9000
exception_code: ZOK status: Finished
exception_code: 0
exception_text:
query_finish_time: 2023-09-01 16:15:14
query_duration_ms: 154
Row 2: Row 2:
────── ──────
entry: query-0000000000 entry: query-0000000001
host_name: clickhouse02 entry_version: 5
host_address: 172.23.0.12 initiator_host: clickhouse01
port: 9000 initiator_port: 9000
status: Finished
cluster: test_cluster cluster: test_cluster
query: CREATE DATABASE test_db UUID '4a82697e-c85e-4e5b-a01e-a36f2a758456' ON CLUSTER test_cluster query: CREATE DATABASE test_db UUID '4a82697e-c85e-4e5b-a01e-a36f2a758456' ON CLUSTER test_cluster
initiator: clickhouse01:9000 settings: {'max_threads':'16','use_uncompressed_cache':'0'}
query_start_time: 2020-12-30 13:07:51 query_create_time: 2023-09-01 16:15:14
query_finish_time: 2020-12-30 13:07:51 host: clickhouse-01
query_duration_ms: 6 port: 9000
exception_code: ZOK status: Finished
exception_code: 630
exception_text: Code: 630. DB::Exception: Cannot drop or rename test_db, because some tables depend on it:
query_finish_time: 2023-09-01 16:15:14
query_duration_ms: 154
2 rows in set. Elapsed: 0.025 sec. 2 rows in set. Elapsed: 0.025 sec.
``` ```