Skip to content

Commit

Permalink
fix log_pointer handler in #967
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed Jul 29, 2024
1 parent bc50de5 commit efc6381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit efc6381

Please sign in to comment.