From efc63812ab5daf4b5269064a652500a92eaca755 Mon Sep 17 00:00:00 2001 From: Slach Date: Mon, 29 Jul 2024 15:52:25 +0400 Subject: [PATCH] fix log_pointer handler in https://github.com/Altinity/clickhouse-backup/issues/967 --- pkg/clickhouse/clickhouse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/clickhouse/clickhouse.go b/pkg/clickhouse/clickhouse.go index 0a373de5..ea859d44 100644 --- a/pkg/clickhouse/clickhouse.go +++ b/pkg/clickhouse/clickhouse.go @@ -1220,7 +1220,7 @@ func (ch *ClickHouse) CheckReplicationInProgress(table metadata.TableMetadata) ( if len(existsReplicas) > 1 { return false, fmt.Errorf("invalid result for check exists replicas: %+v", existsReplicas) } - if existsReplicas[0].LogPointer > 0 || existsReplicas[0].LogMaxIndex > 0 || existsReplicas[0].AbsoluteDelay > 0 || existsReplicas[0].QueueSize > 0 { + if existsReplicas[0].LogPointer > 1 || existsReplicas[0].LogMaxIndex > 1 || existsReplicas[0].AbsoluteDelay > 0 || existsReplicas[0].QueueSize > 0 { return false, fmt.Errorf("%s.%s can't restore cause system.replicas entries already exists and replication in progress from another replica, log_pointer=%d, log_max_index=%d, absolute_delay=%d, queue_size=%d", table.Database, table.Table, existsReplicas[0].LogPointer, existsReplicas[0].LogMaxIndex, existsReplicas[0].AbsoluteDelay, existsReplicas[0].QueueSize) } else { ch.Log.Infof("replication_in_progress status = %+v", existsReplicas)