Skip to content

Commit

Permalink
MySQL multi source failed to set standalone server on rejoining old l…
Browse files Browse the repository at this point in the history
…eader
  • Loading branch information
svaroqui committed Jan 6, 2023
1 parent 695a5a4 commit 55ed1ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cluster/cluster_topo.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (cluster *Cluster) TopologyDiscover(wcg *sync.WaitGroup) error {
if cluster.IsActive() && cluster.master != nil && cluster.GetTopology() == topoMasterSlave && cluster.Servers[k].URL != cluster.master.URL {
//Extra master in master slave topology rejoin it after split brain
cluster.SetState("ERR00063", state.State{ErrType: "ERROR", ErrDesc: fmt.Sprintf(clusterError["ERR00063"]), ErrFrom: "TOPO"})
// cluster.Servers[k].RejoinMaster() /* remove for rolling restart , wrongly rejoin server as master before just after swithover while the server is just stopping
// cluster.Servers[k].RejoinMaster() /* remove for rolling restart , wrongly rejoin server as master before just after swithover while the server is just stopping */
} else {
cluster.master = cluster.Servers[k]
cluster.master.SetMaster()
Expand Down
2 changes: 1 addition & 1 deletion cluster/srv.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ func (server *ServerMonitor) Ping(wg *sync.WaitGroup) {
// 1617 is no multi source channel found
noChannel := false
if errss != nil {
if strings.Contains(errss.Error(), "1617") {
if strings.Contains(errss.Error(), "1617") || strings.Contains(errss.Error(), "3074") {
// This is a special case when using muti source there is a error instead of empty resultset when no replication is defined on channel
// server.ClusterGroup.LogPrintf(LvlInfo, " server: %s replication no channel err 1617 %s ", server.URL, errss)
noChannel = true
Expand Down

0 comments on commit 55ed1ce

Please sign in to comment.