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

Supporting FailMasterPromotionIfSQLThreadNotUpToDate config #104

Merged
merged 6 commits into from Mar 28, 2017

Conversation

shlomi-noach
Copy link
Collaborator

Storyline:

This PR provides a simple solution to #83 by introducing the FailMasterPromotionIfSQLThreadNotUpToDate boolean config.

When this config is "true", and master failover takes place:

  • after the topology is healed
  • and candidate replica is put on top
  • and just before considering this a success
  • and before running hooks
  • We verify that SQL thread is up to date with IO thread, effectively meaning all relay logs are consumed.
    • and if that is not the case, i.e. if the SQL thread is not up do date, i.e. some relay log entries are still pending, then we fail the failover and return with error.

To clarify:

  • detection+hooks still take place
  • topology still healed
  • no post-hooks are executed
  • failover returns with error.

cc @sougou @adkhare @bbeaudreault @sjmudd

@shlomi-noach
Copy link
Collaborator Author

@sougou @adkhare @bbeaudreault any thoughts on your side?

@sougou
Copy link
Collaborator

sougou commented Mar 22, 2017

@shlomi-noach The change looks good to me.

@shlomi-noach shlomi-noach temporarily deployed to production March 26, 2017 12:28 Inactive
@shlomi-noach shlomi-noach deployed to production/github-mysqlutil March 27, 2017 07:33 Active
@shlomi-noach shlomi-noach temporarily deployed to production March 27, 2017 09:59 Inactive
@shlomi-noach shlomi-noach merged commit 4cf0344 into master Mar 28, 2017
@shlomi-noach shlomi-noach deleted the fail-promotion-when-not-up-to-date branch March 28, 2017 09:33
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