From 629f5f07972d7af7cd2139074e8d0b93a786f4ca Mon Sep 17 00:00:00 2001 From: Dmitriy Date: Sun, 13 Dec 2020 18:42:34 +0300 Subject: [PATCH] Update replication_queue.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Выполнил перевод на русский язык, внес изменения в английскую версию. --- .../system-tables/replication_queue.md | 26 +++--- docs/en/sql-reference/statements/system.md | 2 +- .../system-tables/replication_queue.md | 81 +++++++++++++++++++ 3 files changed, 95 insertions(+), 14 deletions(-) create mode 100644 docs/ru/operations/system-tables/replication_queue.md diff --git a/docs/en/operations/system-tables/replication_queue.md b/docs/en/operations/system-tables/replication_queue.md index cc2a97029cc..aa379caa46c 100644 --- a/docs/en/operations/system-tables/replication_queue.md +++ b/docs/en/operations/system-tables/replication_queue.md @@ -1,6 +1,6 @@ # system.replication_queue {#system_tables-replication_queue} -Contains information about tasks from replication queues stored in Zookeeper for tables in the `ReplicatedMergeTree` family. +Contains information about tasks from replication queues stored in ZooKeeper for tables in the `ReplicatedMergeTree` family. Columns: @@ -10,39 +10,39 @@ Columns: - `replica_name` ([String](../../sql-reference/data-types/string.md)) — Replica name in ZooKeeper. Different replicas of the same table have different names. -- `position` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Position of task in the queue. +- `position` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Position of the task in the queue. - `node_name` ([String](../../sql-reference/data-types/string.md)) — Node name in ZooKeeper. -- `type` ([String](../../sql-reference/data-types/string.md)) — Type of task in the queue. +- `type` ([String](../../sql-reference/data-types/string.md)) — Type of the task in the queue: `GET_PARTS`, `MERGE_PARTS`, `DETACH_PARTS`, `DROP_PARTS`, or `MUTATE_PARTS`. - `create_time` ([Datetime](../../sql-reference/data-types/datetime.md)) — Date and time when the task was submitted for execution. -- `required_quorum` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Number of replicas waiting for the task to complete with confirmation of completion. This column is only relevant for the `GET PART` task. +- `required_quorum` ([UInt32](../../sql-reference/data-types/int-uint.md)) — The number of replicas waiting for the task to complete with confirmation of completion. This column is only relevant for the `GET_PARTS` task. -- `source_replica` ([String](../../sql-reference/data-types/string.md)) — Name of source replica. +- `source_replica` ([String](../../sql-reference/data-types/string.md)) — Name of the source replica. -- `new_part_name` ([String](../../sql-reference/data-types/string.md)) — Name of new part. +- `new_part_name` ([String](../../sql-reference/data-types/string.md)) — Name of the new part. - `parts_to_merge` ([Array](../../sql-reference/data-types/array.md) ([String](../../sql-reference/data-types/string.md))) — Names of parts to merge or update. -- `is_detach` ([UInt8](../../sql-reference/data-types/int-uint.md)) — Flag indicates whether the task is being performed using the `TO DETACHED` expression. +- `is_detach` ([UInt8](../../sql-reference/data-types/int-uint.md)) — The flag indicates whether the `DETACH_PARTS` task is in the queue. -- `is_currently_executing` ([UInt8](../../sql-reference/data-types/int-uint.md)) — Flag indicates whether a specific task is being performed right now. +- `is_currently_executing` ([UInt8](../../sql-reference/data-types/int-uint.md)) — The flag indicates whether a specific task is being performed right now. -- `num_tries` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Number of failed attempts to complete the task. +- `num_tries` ([UInt32](../../sql-reference/data-types/int-uint.md)) — The number of failed attempts to complete the task. -- `last_exception` ([String](../../sql-reference/data-types/string.md)) — Text of the message about the last task execution error. +- `last_exception` ([String](../../sql-reference/data-types/string.md)) — Text message about the last error that occurred (if any). - `last_attempt_time` ([Datetime](../../sql-reference/data-types/datetime.md)) — Date and time when the task was last attempted. -- `num_postponed` ([UInt32](../../sql-reference/data-types/int-uint.md)) — Number of postponed tasks. +- `num_postponed` ([UInt32](../../sql-reference/data-types/int-uint.md)) — The number of postponed tasks. -- `postpone_reason` ([String](../../sql-reference/data-types/string.md)) — Reason why the task was postponed. +- `postpone_reason` ([String](../../sql-reference/data-types/string.md)) — The reason why the task was postponed. - `last_postpone_time` ([Datetime](../../sql-reference/data-types/datetime.md)) — Date and time when the task was last postponed. -- `merge_type` ([String](../../sql-reference/data-types/string.md)) — Type of current merge. Empty if it's an mutation. +- `merge_type` ([String](../../sql-reference/data-types/string.md)) — Type of the current merge. Empty if it's a mutation. **Example** diff --git a/docs/en/sql-reference/statements/system.md b/docs/en/sql-reference/statements/system.md index ddba1443d04..bb279703cc2 100644 --- a/docs/en/sql-reference/statements/system.md +++ b/docs/en/sql-reference/statements/system.md @@ -204,7 +204,7 @@ SYSTEM STOP MOVES [[db.]merge_tree_family_table_name] ## Managing ReplicatedMergeTree Tables {#query-language-system-replicated} -ClickHouse can manage background replication related processes in [ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication/#table_engines-replication) tables. +ClickHouse can manage background replication related processes in [ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md#table_engines-replication) tables. ### STOP FETCHES {#query_language-system-stop-fetches} diff --git a/docs/ru/operations/system-tables/replication_queue.md b/docs/ru/operations/system-tables/replication_queue.md new file mode 100644 index 00000000000..47f64aea55d --- /dev/null +++ b/docs/ru/operations/system-tables/replication_queue.md @@ -0,0 +1,81 @@ +# system.replication_queue {#system_tables-replication_queue} + +Содержит информацию о задачах из очередей репликации, хранящихся в ZooKeeper, для таблиц семейства `ReplicatedMergeTree`. + +Столбцы: + +- `database` ([String](../../sql-reference/data-types/string.md)) — имя базы данных. + +- `table` ([String](../../sql-reference/data-types/string.md)) — имя таблицы. + +- `replica_name` ([String](../../sql-reference/data-types/string.md)) — имя реплики в ZooKeeper. Разные реплики одной и той же таблицы имеют различные имена. + +- `position` ([UInt32](../../sql-reference/data-types/int-uint.md)) — позиция задачи в очереди. + +- `node_name` ([String](../../sql-reference/data-types/string.md)) — имя узла в ZooKeeper. + +- `type` ([String](../../sql-reference/data-types/string.md)) — тип задачи в очереди: `GET_PARTS`, `MERGE_PARTS`, `DETACH_PARTS`, `DROP_PARTS` или `MUTATE_PARTS`. + +- `create_time` ([Datetime](../../sql-reference/data-types/datetime.md)) — дата и время отправки задачи на выполнение. + +- `required_quorum` ([UInt32](../../sql-reference/data-types/int-uint.md)) — количество реплик, ожидающих завершения задачи, с подтверждением о завершении. Этот столбец актуален только для задачи `GET_PARTS`. + +- `source_replica` ([String](../../sql-reference/data-types/string.md)) — имя исходной реплики. + +- `new_part_name` ([String](../../sql-reference/data-types/string.md)) — имя нового куска. + +- `parts_to_merge` ([Array](../../sql-reference/data-types/array.md) ([String](../../sql-reference/data-types/string.md))) — имена кусков, которые требуется смержить или обновить. + +- `is_detach` ([UInt8](../../sql-reference/data-types/int-uint.md)) — флаг, указывающий на присутствие в очереди задачи `DETACH_PARTS`. + +- `is_currently_executing` ([UInt8](../../sql-reference/data-types/int-uint.md)) — флаг, указывающий на выполнение конкретной задачи на данный момент. + +- `num_tries` ([UInt32](../../sql-reference/data-types/int-uint.md)) — количество неудачных попыток выполнить задачу. + +- `last_exception` ([String](../../sql-reference/data-types/string.md)) — текст сообщения о последней возникшей ошибке, если таковые имеются. + +- `last_attempt_time` ([Datetime](../../sql-reference/data-types/datetime.md)) — дата и время последней попытки выполнить задачу. + +- `num_postponed` ([UInt32](../../sql-reference/data-types/int-uint.md)) — количество отложенных задач. + +- `postpone_reason` ([String](../../sql-reference/data-types/string.md)) — причина, по которой была отложена задача. + +- `last_postpone_time` ([Datetime](../../sql-reference/data-types/datetime.md)) — дата и время, когда была отложена задача в последний раз. + +- `merge_type` ([String](../../sql-reference/data-types/string.md)) — тип текущего слияния. Пусто, если это мутация. + +**Пример** + +``` sql +SELECT * FROM system.replication_queue LIMIT 1 FORMAT Vertical; +``` + +``` text +Row 1: +────── +database: merge +table: visits_v2 +replica_name: mtgiga001-1t.metrika.yandex.net +position: 15 +node_name: queue-0009325559 +type: MERGE_PARTS +create_time: 2020-12-07 14:04:21 +required_quorum: 0 +source_replica: mtgiga001-1t.metrika.yandex.net +new_part_name: 20201130_121373_121384_2 +parts_to_merge: ['20201130_121373_121378_1','20201130_121379_121379_0','20201130_121380_121380_0','20201130_121381_121381_0','20201130_121382_121382_0','20201130_121383_121383_0','20201130_121384_121384_0'] +is_detach: 0 +is_currently_executing: 0 +num_tries: 36 +last_exception: Code: 226, e.displayText() = DB::Exception: Marks file '/opt/clickhouse/data/merge/visits_v2/tmp_fetch_20201130_121373_121384_2/CounterID.mrk' doesn't exist (version 20.8.7.15 (official build)) +last_attempt_time: 2020-12-08 17:35:54 +num_postponed: 0 +postpone_reason: +last_postpone_time: 1970-01-01 03:00:00 +``` + +**Смотрите также** + +- [Управление таблицами ReplicatedMergeTree](../../sql-reference/statements/system.md/#query-language-system-replicated) + +[Оригинальная статья](https://clickhouse.tech/docs/ru/operations/system_tables/replication_queue)