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

executor: add ru details in slow log and INFORMATION_SCHEMA.SLOW_QUERY #49067

Merged
merged 10 commits into from
Dec 13, 2023

Conversation

glorv
Copy link
Contributor

@glorv glorv commented Nov 30, 2023

What problem does this PR solve?

Issue Number: ref #49318 close #42892

Problem Summary:

What changed and how does it work?

Add Resource_group, Request_unit_read, Request_unit_write and Time_queued_by_rc in slow_log and INFORMATION_SCHEMA.SLOW_QUERY.

NOTE: The three new fields are collected in client-go resourceControlInterceptor after tikv/client-go#1070

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

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 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. labels Nov 30, 2023
Copy link

tiprow bot commented Nov 30, 2023

Hi @glorv. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@glorv
Copy link
Contributor Author

glorv commented Nov 30, 2023

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Nov 30, 2023
go.sum Outdated
@@ -271,6 +271,10 @@ github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgoo
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
github.com/glorv/client-go/v2 v2.0.1-0.20231130110809-812d6876b43f h1:pMnYb5jUkLB9QqXxitBtcg/8Hne+5oYTW9P9w3UN2Jo=
Copy link
Member

Choose a reason for hiding this comment

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

Please run make bazel_prepare and upload the dependencies.

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 4, 2023
@glorv
Copy link
Contributor Author

glorv commented Dec 4, 2023

/retest

@glorv
Copy link
Contributor Author

glorv commented Dec 4, 2023

/test tiprow_fast_test

Copy link

ti-chi-bot bot commented Dec 4, 2023

@glorv: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-ddl-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/canary_ghpr_unit_test
  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test

In response to this:

/test tiprow_fast_test

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.

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Merging #49067 (58b6731) into master (32cf9b9) will increase coverage by 0.4773%.
Report is 60 commits behind head on master.
The diff coverage is 67.5675%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49067        +/-   ##
================================================
+ Coverage   71.0441%   71.5215%   +0.4773%     
================================================
  Files          1368       1415        +47     
  Lines        402948     423474     +20526     
================================================
+ Hits         286271     302875     +16604     
- Misses        96736     101615      +4879     
+ Partials      19941      18984       -957     
Flag Coverage Δ
integration 43.6468% <67.5675%> (?)
unit 71.0450% <ø> (+0.0008%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 47.1508% <ø> (-5.8179%) ⬇️

@glorv
Copy link
Contributor Author

glorv commented Dec 4, 2023

/retest

1 similar comment
@glorv
Copy link
Contributor Author

glorv commented Dec 4, 2023

/retest

@glorv
Copy link
Contributor Author

glorv commented Dec 4, 2023

test failure is caused by #49113

@glorv
Copy link
Contributor Author

glorv commented Dec 5, 2023

@nolouch @CabinfeverB @HuSharp PTAL

@glorv
Copy link
Contributor Author

glorv commented Dec 7, 2023

@nolouch @HuSharp @CabinfeverB PTAL

@glorv
Copy link
Contributor Author

glorv commented Dec 12, 2023

@yudongusa PTAL

@glorv
Copy link
Contributor Author

glorv commented Dec 13, 2023

@easonn7 PTAL

@easonn7
Copy link

easonn7 commented Dec 13, 2023

/approve

Copy link

ti-chi-bot bot commented Dec 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: crazycs520, easonn7, nolouch, tangenta

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 added the approved label Dec 13, 2023
@ti-chi-bot ti-chi-bot bot merged commit 161107a into pingcap:master Dec 13, 2023
16 checks passed
@glorv glorv deleted the ru-details branch December 13, 2023 07:54
@nolouch nolouch added needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. labels Feb 1, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 1, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 1, 2024
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.6 from head ti-chi-bot:cherry-pick-49067-to-release-7.6: 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-49067-to-release-7.6."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request could not be created: failed to create pull request against pingcap/tidb#release-7.6 from head ti-chi-bot:cherry-pick-49067-to-release-7.6: 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-49067-to-release-7.6."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 1, 2024
@ti-chi-bot ti-chi-bot removed the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Feb 18, 2024
@ti-chi-bot ti-chi-bot removed the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Apr 18, 2024
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.6 ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support displaying the RU statistics info for slow queries
7 participants