-
Notifications
You must be signed in to change notification settings - Fork 6.1k
feat(session): add schema upgrade v254 to optimize runaway watch index #65828
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
c326df3 to
eca7913
Compare
|
/retest |
eca7913 to
0d12231
Compare
0d12231 to
ba14605
Compare
wjhuang2016
left a comment
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.
UT & FT is needed
pkg/session/upgrade_def.go
Outdated
| } | ||
|
|
||
| func upgradeToVer254(s sessionapi.Session, _ int64) { | ||
| doReentrantDDL(s, "ALTER TABLE mysql.tidb_runaway_watch ADD INDEX idx_start_time(start_time)", dbterror.ErrDupKeyName) |
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.
No comment for these indexes, they are not the same as CreateTiDBRunawayWatchDoneTable
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.
Updated.
|
/hold |
Signed-off-by: JmPotato <github@ipotato.me>
…temTableIncremental Signed-off-by: JmPotato <github@ipotato.me>
…on in upgrade v254 Signed-off-by: JmPotato <github@ipotato.me>
ba14605 to
49c2ebf
Compare
The tests for read and write functions related to these two tables are included in the UT and FT of the Runaway feature tests. For the newly added index, I’ve also added the corresponding explain tests in this PR. |
I mean, testing the upgrade. check session/bootstrap_test.go |
Understood, tests for version 254 have been added in |
Signed-off-by: JmPotato <github@ipotato.me>
fa7b9d1 to
4cbbeee
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wjhuang2016, yudongusa, YuJuncen The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/unhold |
|
/retest |
|
@JmPotato: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/retest |
What problem does this PR solve?
Issue Number: ref #65746.
Problem Summary:
Optimize the performance of the runaway watch sync loop.
What changed and how does it work?
Introduce bootstrap version 254 that adds indexes to improve query efficiency in the runaway watch mechanism:
idx_start_timeonmysql.tidb_runaway_watch(start_time)idx_done_timeonmysql.tidb_runaway_watch_done(done_time)Check List
Tests
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.