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

Panic on missing _ghc and _gho tables #772

Closed
wants to merge 6 commits into from

Conversation

shlomi-noach
Copy link
Contributor

Fixes #763

In case of accidental removal of _gho table while migration was running, gh-ost was correctly bailing out on failing to apply rows to the _gho table, but did not panic during cut-over phase.

With this PR:

  • gh-ost correctly panics at cut-over phase
  • Also, gh-ost now correctly panics when the _ghc table is accidentally removed throughout the migration.

cc @tomkrouper @ggunson

@shlomi-noach
Copy link
Contributor Author

This seems too strict. We have a known race condition after cut-over where the gho table can be renamed; this PR then fails the migration even though everything is fine.

@shlomi-noach shlomi-noach temporarily deployed to production/mysql_role=ghost_testing February 4, 2020 07:25 Inactive
@shlomi-noach
Copy link
Contributor Author

As per #772 (comment) I recommend holding off this PR.

@timvaillancourt
Copy link
Collaborator

This seems too strict. We have a known race condition after cut-over where the gho table can be renamed; this PR then fails the migration even though everything is fine.

@shlomi-noach would this PR be safer if we had a mutex at the cut-over, eg: #755?

@shlomi-noach
Copy link
Contributor Author

would this PR be safer if we had a mutex at the cut-over

@timvaillancourt I guess maybe? Depends on the mutex; there's already much locking/scheduling in gh-ost so we'd need to be careful so as not to introduce a deadlock or any other mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accidental rename of _ghc or _gho should cause gh-ost fatally exit.
2 participants