-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Online DDL forced cut-over: terminate transactions holding metadata locks on table #17535
base: main
Are you sure you want to change the base?
Online DDL forced cut-over: terminate transactions holding metadata locks on table #17535
Conversation
…ocks on table Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
go/vt/vttablet/onlineddl/executor.go
Outdated
rs, err := conn.Conn.ExecuteFetch(query, -1, true) | ||
if err != nil { | ||
return vterrors.Wrapf(err, "finding transactions locking table") | ||
{ |
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.
Maybe extract out into a common function and pass in the capability and query for the two cases?
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.
Agreed. They seem identical other than the capability and query so we could pass both into a function.
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.
done.
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.
❤️
Just the two nits about a shared function and the mysqlgr flavor file.
go/vt/vttablet/onlineddl/executor.go
Outdated
rs, err := conn.Conn.ExecuteFetch(query, -1, true) | ||
if err != nil { | ||
return vterrors.Wrapf(err, "finding transactions locking table") | ||
{ |
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.
Agreed. They seem identical other than the capability and query so we could pass both into a function.
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17535 +/- ##
=======================================
Coverage 67.68% 67.69%
=======================================
Files 1584 1584
Lines 254717 254726 +9
=======================================
+ Hits 172417 172431 +14
+ Misses 82300 82295 -5 ☔ View full report in Codecov by Sentry. |
You'll have to merge in origin/main to get the fixes in #17540 |
Signed-off-by: Shlomi Noach <[email protected]>
Description
Followup to #14546
This PR complements #14546 by also addressing transactions that are holding metadata locks on the migrated table (as seen in
performance_schema.metadata_locks
starting MySQL8.0.2
).Added an
endtoend
test that validated forced termination.Related Issue(s)
#14530
Checklist
Deployment Notes