Online DDL forced cut-over: terminate transactions holding metadata locks on table#17535
Conversation
…ocks on table Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
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 <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
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.
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.
Agreed. They seem identical other than the capability and query so we could pass both into a function.
mattlord
left a comment
There was a problem hiding this comment.
❤️
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.
Agreed. They seem identical other than the capability and query so we could pass both into a function.
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
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 <2607934+shlomi-noach@users.noreply.github.com>
|
No doc changes required. |
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_locksstarting MySQL8.0.2).Added an
endtoendtest that validated forced termination.Related Issue(s)
#14530
Checklist
Deployment Notes