Skip to content
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

Merged
merged 4 commits into from
Sep 12, 2023
Merged

feat: optimize replication settings when the replica is offline #34

merged 4 commits into from
Sep 12, 2023

Conversation

Fizic
Copy link
Contributor

@Fizic Fizic commented Sep 6, 2023

No description provided.

err = node.OptimizeReplication()
if err != nil {
app.logger.Errorf("repair: failed to set optimize replication settings on slave %s: %s", host, err)
}
Copy link
Collaborator

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?


err = node.SetDefaultReplicationSettings(masterNode)
if err != nil {
app.logger.Errorf("repair: failed to set optimize replication settings on slave %s: %s", host, err)
Copy link
Collaborator

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.

@ostinru
Copy link
Collaborator

ostinru commented Sep 6, 2023

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)
The only hope is that we don't have client requests running.

@ostinru
Copy link
Collaborator

ostinru commented Sep 6, 2023

But generally, this's sick! Have no idea why we haven't done it before =)

@teem0n teem0n merged commit 4f79361 into yandex:master Sep 12, 2023
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants