复制队列陷入错误

时间:2018-06-30 08:38:56

标签: clickhouse

我有3个节点群集,其中包含复制2和复制的表stats

最近看到使用/replica_satatus

的副本数据库存在延迟
db.stats:   Absolute delay: 0. Relative delay: 0.
db2.stats:  Absolute delay: 912916. Relative delay: 912916.

这是system.replication_queue

中的数据
Row 1:
──────
database: db2
table: stats
replica_name:           replica_2
position:               3
node_name:              queue-0001743101
type:                   GET_PART
create_time:            2018-06-19 20:57:42
required_quorum:        0
source_replica:         replica_1
new_part_name:          20180619_20180619_823572_823572_0
parts_to_merge:         []
is_detach:              0
is_currently_executing: 0
num_tries:              917943
last_exception:
last_attempt_time:      2018-06-29 15:32:50
num_postponed:          118617
postpone_reason:
last_postpone_time:     2018-06-29 15:32:23

Row 2:
──────
database: db2
table: stats
replica_name:           replica_2
position:               4
node_name:              queue-0001743103
type:                   MERGE_PARTS
create_time:            2018-06-19 20:57:48
required_quorum:        0
source_replica:         replica_1
new_part_name:          20180619_20180619_823568_823573_1
parts_to_merge:         ['20180619_20180619_823568_823568_0','20180619_20180619_823569_823569_0','20180619_20180619_823570_823570_0','20180619_20180619_823571_823571_0','20180619_20180619_823572_823572_0','20180619_20180619_823573_823573_0']
is_detach:              0
is_currently_executing: 0
num_tries:              917943
last_exception:         Code: 234, e.displayText() = DB::Exception: No active replica has part 20180619_20180619_823568_823573_1 or covering part, e.what() = DB::Exception
last_attempt_time:      2018-06-29 15:32:50
num_postponed:          199384
postpone_reason:        Not merging into part 20180619_20180619_823568_823573_1 because part 20180619_20180619_823572_823572_0 is not ready yet (log entry for that part is being processed).
last_postpone_time:     2018-06-29 15:32:35

有什么线索如何处理吗?

我应该分离损坏的副本分区并重新附加吗?

1 个答案:

答案 0 :(得分:0)

停止所有插入到该群集的操作,它应自动清除复制队列。