-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: optimize replication settings when the replica is offline #34
feat: optimize replication settings when the replica is offline #34
Conversation
internal/app/app.go
Outdated
err = node.OptimizeReplication() | ||
if err != nil { | ||
app.logger.Errorf("repair: failed to set optimize replication settings on slave %s: %s", host, err) | ||
} |
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.
replPermBroken
is true
. Does it make sense to change replication settings in this case?
internal/app/app.go
Outdated
|
||
err = node.SetDefaultReplicationSettings(masterNode) | ||
if err != nil { | ||
app.logger.Errorf("repair: failed to set optimize replication settings on slave %s: %s", host, err) |
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.
Let's make this error message distinguishable from the same message below. It will make it easier to investigate incidents.
Also, I don't know how to detect slave crashed when 'optimized' settings are ON... (AFAIK, you will check my.cnf & error.log on crash-recovery... that will not show that binlog settings were unsafe) |
But generally, this's sick! Have no idea why we haven't done it before =) |
No description provided.