-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
statistics: merge global stats even if some partition stats are missing #41176
statistics: merge global stats even if some partition stats are missing #41176
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. 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. |
@xuyifangreeneyes Please fix the conflict. |
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.
please add tests
statistics/handle/handle.go
Outdated
return | ||
} | ||
if allPartitionStats == nil { | ||
allPartitionStats = make(map[int64]*statistics.Table) | ||
} | ||
allPartitionStats[partitionID] = partitionStats | ||
} | ||
globalStats.Count += partitionStats.Count | ||
globalStats.ModifyCount += partitionStats.ModifyCount |
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.
Do we need to remove the count adding later in this func?
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.
Yes. It is a mistake I made when resolving conflicts.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #41176 +/- ##
================================================
+ Coverage 73.2404% 73.2481% +0.0076%
================================================
Files 1267 1270 +3
Lines 389943 390679 +736
================================================
+ Hits 285596 286165 +569
- Misses 86048 86170 +122
- Partials 18299 18344 +45
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test check-dev |
@xuyifangreeneyes: The specified target(s) for
Use 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 kubernetes/test-infra repository. |
/test build |
@xuyifangreeneyes: The specified target(s) for
Use 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 kubernetes/test-infra repository. |
/unhold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrysan, hawkingrei, qw4990 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@xuyifangreeneyes: The following test failed, say
Full PR test history. Your PR dashboard. 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 kubernetes/test-infra repository. I understand the commands that are listed here. |
/test unit-test |
@xuyifangreeneyes: The specified target(s) for
Use 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 kubernetes/test-infra repository. |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.1 from head ti-chi-bot:cherry-pick-41176-to-release-7.1: the GitHub API request returns a 403 error: {"message":"You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later. If you reach out to GitHub Support for help, please include the request ID ACA6:3F108B:1B81993:33D55A3:671F467B and timestamp 2024-10-28 08:08:27 UTC.","documentation_url":"https://docs.github.com/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits","status":"403"} |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
What problem does this PR solve?
Issue Number: ref #38999
Problem Summary:
What is changed and how it works?
Introduce a system variable
tidb_skip_missing_partition_stats
, whose default value ison
. Iftidb_skip_missing_partition_stats
turns on, merging global stats would skip partitions whose stats are missing rather than fail.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.