-
Notifications
You must be signed in to change notification settings - Fork 6k
executor: use helper.GetRegionsTableInfo to get region schema for tidb_hot_regions_history #30500
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
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
After you have format title, you can leave a comment |
/run-all-tests |
a714f90
to
19e3526
Compare
…Info ref pingcap#30518 Signed-off-by: IcePigZDB <[email protected]>
Signed-off-by: IcePigZDB <[email protected]>
Signed-off-by: IcePigZDB <[email protected]>
Signed-off-by: IcePigZDB <[email protected]>
f798ea1
to
0bdc394
Compare
Signed-off-by: IcePigZDB <[email protected]>
47ef1a4
to
f203272
Compare
Signed-off-by: IcePigZDB <[email protected]>
Signed-off-by: IcePigZDB <[email protected]>
Signed-off-by: IcePigZDB <[email protected]>
/run-all-tests |
Signed-off-by: IcePigZDB <[email protected]>
Signed-off-by: IcePigZDB <[email protected]>
/run-check_dev_2 |
Signed-off-by: IcePigZDB <[email protected]>
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.
The rest LGTM
BTW, I find the results of the key rate in your description is always 0. |
…r test Signed-off-by: IcePigZDB <[email protected]>
Signed-off-by: IcePigZDB <[email protected]>
check_dev_2
It's recorded on PD side, I will try to dig it on another day. |
/run-unit-test |
Hot regions through sysbench with small table size 100,000 rather than 1000,000. sysbench --config-file=sb_config oltp_point_select --tables=32 --table-size=100000 prepare
sysbench --config-file=sb_config oltp_point_select --tables=32 --table-size=100000 run
sysbench --config-file=sb_config oltp_update_index --tables=32 --table-size=100000 run
sysbench --config-file=sb_config oltp_read_only --tables=32 --table-size=100000 run And log the result got from // GetHotReadRegions gets all hot read regions stats.
func (h *Handler) GetHotReadRegions() *statistics.StoreHotPeersInfos {
c, err := h.GetRaftCluster()
if err != nil {
return nil
}
return c.GetHotReadRegions()
} I put the log here, |
/merge |
@nolouch: In response to this:
Instructions 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 ti-community-infra/tichi repository. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 4688f85
|
@IcePigZDB: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions 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 ti-community-infra/tichi repository. |
Signed-off-by: IcePigZDB [email protected]
What problem does this PR solve?
Issue Number: #30518
Problem Summary:
TIDB_HOT_REGIONS_HISTORY
need to parse shcema info on TiDB according to the key range of every Region. However, after v5.0enable-cross-table-merge
is default to true, a region may contain multi tables or indics, Previous implemention #27375tidb/store/helper/Helper.FindTableIndexOfRegion
iterate over all tables(first table record and then index ) to check whether it is contained in the region and stop iterate when it find the first table or index. This may result in incomplete result, so useGetTablesInfoWithKeyRange
forTIDB_HOT_REGIONS_HISTORY
.GetRegionsTableInfo
instead ofFindTableIndexOfRegion
.GetTablesInfoWithKeyRange
fromGetRegionsTableInfo
to avoid repeat call.HOT_DEGREE
,HOT_DEGREE
,KEY_RATE
,QUERY_RATE
) default value instead of set NULL when they are 0.Change Preview
I list top 10 region in time order for three query and check region's schema with
tikv_region_status
, new implemention is consistent withtikv_region_status
. Complete result is here.Compared with the old Schema parsing method, the new method also parses the index of the region, it will parse other tables too if there are. Due to the allSchemas' order may different each query, it leads to inconsistent query results.
Check List
Tests
Side effects
Documentation
Release note