Skip to content

Commit ba3c2af

Browse files
committed
Config sample for mutli source cluster
1 parent d83586c commit ba3c2af

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cluster/cluster_has.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func (cluster *Cluster) HasServer(srv *ServerMonitor) bool {
1818
for _, sv := range cluster.Servers {
1919
// cluster.LogPrintf(LvlInfo, "HasServer:%s %s, %s %s", sv.Id, srv.Id, sv.URL, srv.URL)
2020
// id can not be used for checking equality because same srv in different clusters
21-
cluster.LogPrintf(LvlInfo, "HasServer check %s vs %s ", sv.URL, srv.URL)
21+
// cluster.LogPrintf(LvlInfo, "HasServer check %s vs %s ", sv.URL, srv.URL)
2222
// When server has no port URL has no port then discovery use port
2323
if sv.URL == srv.URL || sv.URL == srv.URL+":3306" {
2424
return true

etc/local/mutlitiercluster/config.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,22 @@ db-servers-credential = "root:mariadb"
1313
db-servers-connect-timeout = 1
1414
replication-source-name = "source1"
1515
replication-credential = "root:mariadb"
16-
16+
force-slave-readonly = false
1717
haproxy = true
1818
haproxy-write-port = 3303
1919
haproxy-read-port = 3302
2020

2121
[cluster-haproxy-source2]
2222
title = "cluster-haproxy-source2"
23+
2324
cluster-head = "cluster-haproxy-source1"
2425
db-servers-hosts = "127.0.0.1:3312,127.0.0.1:3313"
2526
db-servers-prefered-master = "127.0.0.1:3312"
2627
db-servers-credential = "root:mariadb"
2728
db-servers-connect-timeout = 1
2829
replication-source-name = "source2"
2930
replication-credential = "root:mariadb"
31+
force-slave-readonly = false
3032
prov-db-domain = "2"
3133

3234

0 commit comments

Comments
 (0)