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

Merged

Conversation

CabinfeverB
Copy link
Contributor

@CabinfeverB CabinfeverB commented Jun 6, 2023

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

Signed-off-by: Cabinfever_B <[email protected]>
@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 6, 2023
@ti-chi-bot ti-chi-bot bot requested a review from TonsnakeLin June 6, 2023 09:55
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 6, 2023
@CabinfeverB
Copy link
Contributor Author

cc @HuSharp @glorv @songrijie @nolouch

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

var (
errTooFewMetricsPoints = errors.Normalize("There are too few metrics points available in selected time window, %v")
Copy link
Contributor

@glorv glorv Jun 6, 2023

Choose a reason for hiding this comment

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

Shall we also return the error message The workload in selected time window is too low ... here? The user may not know the meaning of too few metrics points

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it.

Signed-off-by: Cabinfever_B <[email protected]>
Copy link
Contributor

@HuSharp HuSharp left a comment

Choose a reason for hiding this comment

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

LGTM!

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 9, 2023

@HuSharp: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM!

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.

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 12, 2023
Signed-off-by: Cabinfever_B <[email protected]>
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 12, 2023
@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 16, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, HuSharp, 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 Jun 16, 2023
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 16, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-06-12 05:03:36.918663704 +0000 UTC m=+128766.373425007: ☑️ agreed by glorv.
  • 2023-06-16 08:18:01.981063871 +0000 UTC m=+332878.395667950: ☑️ agreed by nolouch.

@CabinfeverB
Copy link
Contributor Author

/test check-dev

@ti-chi-bot ti-chi-bot bot merged commit 841aed8 into pingcap:master Jun 16, 2023
@glorv glorv added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Jul 5, 2023
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #45167.

CabinfeverB added a commit to ti-chi-bot/tidb that referenced this pull request Jul 5, 2023
This reverts commit 3736109.

Signed-off-by: Cabinfever_B <[email protected]>
ti-chi-bot bot pushed a commit that referenced this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error 1105 (HY000): metrics resource_manager_resource_unit is empty is confusing when using calibrate resource
5 participants