Skip to content

Commit

Permalink
make ERR00072 warning more informative
Browse files Browse the repository at this point in the history
  • Loading branch information
ahfa92 committed Jan 3, 2024
1 parent c718685 commit 88e3f2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cluster/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var clusterError = map[string]string{
"ERR00069": "ProxySQL could not set %s as reader (%s) different state OFFLINE_HARD",
"ERR00070": "ProxySQL could not set %s as reader (%s) different state ONLINE",
"ERR00071": "ProxySQL %s could not set discoverd master %s as writer (%s)",
"ERR00072": "ProxySQL could not set discoverd slave %s as reader (%s)",
"ERR00072": "ProxySQL %s could not set discoverd slave %s as reader (%s)",
"ERR00073": "Could not get events on server %s",
"ERR00074": "Prefered server %s not found in configured server list",
"ERR00075": "Can't fecth Processlist %s",
Expand Down
2 changes: 1 addition & 1 deletion cluster/prx_proxysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (proxy *ProxySQLProxy) Refresh() error {
cluster.LogPrintf(LvlInfo, "Monitor ProxySQL setting reader standalone server %s", s.URL)
}
if err != nil {
cluster.StateMachine.AddState("ERR00072", state.State{ErrType: "WARNING", ErrDesc: fmt.Sprintf(clusterError["ERR00072"], err, s.URL), ErrFrom: "PRX", ServerUrl: proxy.Name})
cluster.StateMachine.AddState("ERR00072", state.State{ErrType: "WARNING", ErrDesc: fmt.Sprintf(clusterError["ERR00072"], proxy.Name, s.URL, err), ErrFrom: "PRX", ServerUrl: proxy.Name})
}
updated = true
} else if s.IsSlaveOrSync() && !isFoundBackendRead && !s.IsIgnored() {
Expand Down

0 comments on commit 88e3f2d

Please sign in to comment.