-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
store/helper: fill data in the information.tidb_hot_table for partitioned table #14331
Conversation
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.
LGTM
PTAL @winoros |
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.
LGTM
could you add some tests for this bugfix? |
Not easy to do it in the unit test. If we mock data, it can't prevent PD from changing the interface in the future. |
/run-all-tests |
/run-cherry-picker |
cherry pick to release-3.0 in PR #16726 |
cherry pick to release-3.1 in PR #16727 |
What problem does this PR solve?
INFORMATION.TIDB_HOT_TABLE
should take the partitioned table into consideration.What is changed and how it works?
A partitioned table is not handled properly in tidb_hot_table.
After this change, we can get the correct information:
Note, 151 and 150 are both belong to sbtest3, and the table name column is displayed as
sbtest3(p1)
andsbtest3(p0)
to indicate they are partitions.Check List
Tests
Mock the data is hard, the old code is not really unit tested.
I use a real tikv cluster and check the result.
B.T.W, a bug is fixed, pd returns something like this:
From the PD result we can see
flow_bytes
is a float, not uint. @disksing @nolouchRelated changes
Release note