Skip to content

Commit

Permalink
ProxySQL add reader node if not in reader group
Browse files Browse the repository at this point in the history
  • Loading branch information
svaroqui committed Jan 13, 2023
1 parent bab5a65 commit e93e417
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cluster/prx_proxysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,10 @@ func (proxy *ProxySQLProxy) Refresh() error {
cluster.sme.AddState("ERR00072", state.State{ErrType: "WARNING", ErrDesc: fmt.Sprintf(clusterError["ERR00072"], err, s.URL), ErrFrom: "PRX", ServerUrl: proxy.Name})
}
updated = true
} else if s.IsSlave && !isFoundBackendRead && !s.IsIgnored() {
err = psql.AddServerAsReader(misc.Unbracket(s.Host), s.Port, "1", strconv.Itoa(s.ClusterGroup.Conf.PRXServersBackendMaxReplicationLag), strconv.Itoa(s.ClusterGroup.Conf.PRXServersBackendMaxConnections), strconv.Itoa(misc.Bool2Int(s.ClusterGroup.Conf.PRXServersBackendCompression)), proxy.UseSSL())
updated = true
}

} //if bootstrap

// load the grants
Expand Down

0 comments on commit e93e417

Please sign in to comment.