Skip to content

Commit

Permalink
Fix remote_servers
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-zaitsev committed May 8, 2024
1 parent dc95be0 commit 89ebd68
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/model/chi/ch_config_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (c *ClickHouseConfigGenerator) GetRemoteServers(options *RemoteServersGener
util.Iline(b, 8, "<!-- Autogenerated clusters -->")
// One Shard All Replicas

// <my_cluster_name>
// <sll-replicated>
// <shard>
// <internal_replication>
clusterName := OneShardAllReplicasClusterName
Expand All @@ -418,13 +418,13 @@ func (c *ClickHouseConfigGenerator) GetRemoteServers(options *RemoteServersGener
})

// </shard>
// </my_cluster_name>
// </sll-replicated>
util.Iline(b, 8, " </shard>")
util.Iline(b, 8, "</%s>", clusterName)

// All Shards One Replica

// <my_cluster_name>
// <all-sharded>
clusterName = AllShardsOneReplicaClusterName
util.Iline(b, 8, "<%s>", clusterName)
c.chi.WalkHosts(func(host *api.ChiHost) error {
Expand All @@ -441,13 +441,13 @@ func (c *ClickHouseConfigGenerator) GetRemoteServers(options *RemoteServersGener
}
return nil
})
// </my_cluster_name>
// </all-sharded>
util.Iline(b, 8, "</%s>", clusterName)

// All shards from all clusters

// <all-sharded>
clusterName = AllShardsOneReplicaClusterName
// <all-clusters>
clusterName = AllClustersClusterName
util.Iline(b, 8, "<%s>", clusterName)
c.chi.WalkClusters(func(cluster *api.Cluster) error {
cluster.WalkShards(func(index int, shard *api.ChiShard) error {
Expand All @@ -471,7 +471,7 @@ func (c *ClickHouseConfigGenerator) GetRemoteServers(options *RemoteServersGener

return nil
})
// </all-sharded>
// </all-clusters>
util.Iline(b, 8, "</%s>", clusterName)
}

Expand Down

0 comments on commit 89ebd68

Please sign in to comment.