Created
January 21, 2020 19:18
-
-
Save adsr/321b67463026aa223324d415aa0551ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/go/vt/vttablet/tabletmanager/rpc_replication.go b/go/vt/vttablet/tabletmanager/rpc_replication.go | |
| index f0eea772f..d226d3a51 100644 | |
| --- a/go/vt/vttablet/tabletmanager/rpc_replication.go | |
| +++ b/go/vt/vttablet/tabletmanager/rpc_replication.go | |
| @@ -289,7 +289,7 @@ func (agent *ActionAgent) InitSlave(ctx context.Context, parent *topodatapb.Tabl | |
| if err := agent.MysqlDaemon.SetSlavePosition(ctx, pos); err != nil { | |
| return err | |
| } | |
| - if err := agent.MysqlDaemon.SetMaster(ctx, topoproto.MysqlHostname(ti.Tablet), int(topoproto.MysqlPort(ti.Tablet)), false /* slaveStopBefore */, true /* slaveStartAfter */); err != nil { | |
| + if err := agent.MysqlDaemon.SetMaster(ctx, ti.Tablet.Hostname, int(topoproto.MysqlPort(ti.Tablet)), false /* slaveStopBefore */, true /* slaveStartAfter */); err != nil { | |
| return err | |
| } | |
| agent.initReplication = true | |
| @@ -641,7 +641,7 @@ func (agent *ActionAgent) setMasterLocked(ctx context.Context, parentAlias *topo | |
| if err != nil { | |
| return err | |
| } | |
| - masterHost := topoproto.MysqlHostname(parent.Tablet) | |
| + masterHost := parent.Tablet.Hostname | |
| masterPort := int(topoproto.MysqlPort(parent.Tablet)) | |
| if status.MasterHost != masterHost || status.MasterPort != masterPort { | |
| // This handles both changing the address and starting replication. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment