-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
because lock is not release, drop cutover sentry table is hanged #1171
Comments
@shlomi-noach Please review when you have time |
@shlomi-noach Please review when you have time, thank you very much! |
@timvaillancourt @dm-2 @jsoref Please review when you have time, thank you very much! |
👋 @lmtwga, thanks for the issue and PR! Nice debugging! Just to summarise what's happening:
The deadlock only happens after we've failed the cut-over due to an error, so it has no impact on successful gh-ost migrations. The impact of this deadlock scenario is that it will delay the retry of failed cut-overs if |
@dm-2 Lines 943 to 947 in 3f44e04
The lock will block all subsequent operations. For example, as shown in the figure below: the operations in the green boxes are blocked. |
Good point! I'll take a look at the PR again 👍 |
Fixed by #1180 |
…to lock This PR contains a fix for the deadlock issue described in github#992 (which is also discussed here github#1171). The fix is introduced in the original repo here https://github.com/github/gh-ost/pull/1180/files. This PR contains a cherry-pick of that fix
reason
gh-ost/go/logic/migrator.go
Lines 668 to 670 in 3f44e04
gh-ost/go/logic/migrator.go
Lines 644 to 649 in 3f44e04
gh-ost/go/logic/applier.go
Lines 974 to 984 in 3f44e04
gh-ost/go/mysql/utils.go
Lines 56 to 57 in 3f44e04
so, the first place to drop sentry table will use a different MySQL thread, will be hanged until db connection timeout.
behavior
drop _del table will hanged until db connection timeout
Partial execution log
solution
Which fun to create sentry table, drop the sentry table should to be in the same fun, Is it right?
#1180
The text was updated successfully, but these errors were encountered: