-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change semi-sync information to use the parameter passed and deprecate enable_semi_sync #9725
Conversation
b42be5a
to
a329218
Compare
… using enable_semi_sync Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
a329218
to
d87c83b
Compare
Signed-off-by: Manan Gupta <manan@planetscale.com>
d87c83b
to
511a00b
Compare
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
511a00b
to
5d94167
Compare
Signed-off-by: Manan Gupta <manan@planetscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM. I had only one question.
Nice work!
// In SetReplicationSource, we find that the source host and port was already set correctly, | ||
// So we try to stop and start replication. The first STOP SLAVE comes from there | ||
"STOP SLAVE", | ||
// During the START SLAVE call, we find a relay log error, so we try to restart replication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the relay log error from START
or STOP
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We get it from StartReplicaton
command to mysql. In our test environment we are using the FakeMySQLDaemon
// StartReplication is part of the MysqlDaemon interface.
func (fmd *FakeMysqlDaemon) StartReplication(hookExtraEnv map[string]string) error {
if fmd.StartReplicationError != nil {
return fmd.StartReplicationError
}
return fmd.ExecuteSuperQueryList(context.Background(), []string{
"START SLAVE",
})
}
and we set the StartReplicationError
as -
goodReplica1.FakeMysqlDaemon.StartReplicationError = errors.New("Slave failed to initialize relay log info structure from the repository")
So we get the error in StartReplication, but it isn't seen in the Execute Super Query List
Description
This PR deprecates
enable_semi_sync
flag and changes the implementation forfixSemiSync
to use the flag passed down from the RPC.Backup
andRestoreFromBackup
RPC's are also fixed to callSetReplicationSource
when they finish. This is needed since the primary could have changed during the backup or restore process and the semi-sync settings need to be updated.Related Issue(s)
#8975
Checklist
Deployment Notes
enable_semi_sync
is deprecated and the user should be setting the correctdurability_policy
instead.