Skip to content
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

calibrate: refactor metrics error (#44451) #45167

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #44451

What problem does this PR solve?

Issue Number: ref #43212 close #45166

Problem Summary:

What is changed and how it works?

We attribute the case where metrics are empty and the case where there are too few metrics points available to the situation that the workload in selected time window is too low.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot mentioned this pull request Jul 5, 2023
12 tasks
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR. labels Jul 5, 2023
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved labels Jul 5, 2023
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 5, 2023
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 5, 2023
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 5, 2023
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 5, 2023
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Jul 5, 2023
@CabinfeverB
Copy link
Contributor

and cherry-pick #43248

@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 5, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 5, 2023
@glorv
Copy link
Contributor

glorv commented Jul 5, 2023

@nolouch PTAL

@@ -195,6 +196,11 @@ func (e *calibrateResourceExec) Next(ctx context.Context, req *chunk.Chunk) erro
return e.staticCalibrate(ctx, req, exec)
}

var (
errLowUsage = errors.Errorf("The workload in selected time window is too low, with which TiDB is unable to reach a capacity estimation; please select another time window with higher workload, or calibrate resource by hardware instead")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
errLowUsage = errors.Errorf("The workload in selected time window is too low, with which TiDB is unable to reach a capacity estimation; please select another time window with higher workload, or calibrate resource by hardware instead")
errLowUsage = errors.Errorf("Unable to estimate capacity due to low workload in the selected time window. Please choose another time window with higher workload or calibrate hardware resources instead.")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a cherry-pick, it's not better to modify it.

@ti-chi-bot ti-chi-bot bot added the lgtm label Jul 5, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, nolouch

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 5, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 5, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-07-05 08:52:51.828937517 +0000 UTC m=+194003.762570940: ☑️ agreed by glorv.
  • 2023-07-05 10:18:55.164017957 +0000 UTC m=+199167.097651378: ☑️ agreed by nolouch.

@ti-chi-bot ti-chi-bot bot merged commit 9cac952 into pingcap:release-7.1 Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-7.1 This PR is cherry-picked to release-7.1 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants