-
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
statistics: skip auto-analyze when it is executed outside the available time period #49541
statistics: skip auto-analyze when it is executed outside the available time period #49541
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #49541 +/- ##
================================================
+ Coverage 71.0034% 71.5206% +0.5172%
================================================
Files 1368 1419 +51
Lines 399351 415396 +16045
================================================
+ Hits 283553 297094 +13541
- Misses 96007 99511 +3504
+ Partials 19791 18791 -1000
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
…he available time period Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
7d3553c
to
a5bf3ae
Compare
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[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.
rest LGTM.
Approve in advance. Please fix the nit issues.
@@ -392,6 +395,9 @@ func randomPickOneTableAndTryAutoAnalyze( | |||
|
|||
// We need to check every partition of every table to see if it needs to be analyzed. | |||
for _, tbl := range tbls { | |||
if !timeutil.WithinDayTimePeriod(start, end, time.Now()) { |
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.
Could you please comment on why it is necessary to check it repeatedly?
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.
OK, I added.
} | ||
se, err := dom.SysSessionPool().Get() | ||
require.NoError(t, err) | ||
require.False(t, autoanalyze.RandomPickOneTableAndTryAutoAnalyze(se.(sessionctx.Context), dom.StatsHandle(), dom.SysProcTracker(), dom.InfoSchema(), 0.6, variable.Dynamic, ttStart, ttEnd)) |
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.
This line appears to be a bit lengthy. Would it be better if we break it down?
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.
fixed
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hi-rustin, time-and-fate 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 |
[LGTM Timeline notifier]Timeline:
|
/hold Feel free to /unhold it when you are ready to merge it. |
Co-authored-by: Rustin Liu <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
/unhold |
/cherrypick release-7.5 |
@hawkingrei: new pull request created to branch 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. |
Signed-off-by: ti-chi-bot <[email protected]>
/cherry-pick release-7.5 |
In response to a cherrypick label: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.5 from head ti-chi-bot:cherry-pick-49541-to-release-7.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-49541-to-release-7.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"} |
@ti-chi-bot: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.5 from head ti-chi-bot:cherry-pick-49541-to-release-7.5: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ti-chi-bot:cherry-pick-49541-to-release-7.5."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"} 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. |
/cherrypick release-7.1 |
@hawkingrei: new pull request created to branch 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. |
Signed-off-by: ti-chi-bot <[email protected]>
@hawkingrei: new pull request created to branch 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. |
Signed-off-by: ti-chi-bot <[email protected]>
What problem does this PR solve?
Issue Number: close #49552
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.