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

bindinfo: add status vars for 'last_plan_binding_update_time' #26340

Merged
merged 15 commits into from
Aug 3, 2021

Conversation

Reminiscent
Copy link
Contributor

@Reminiscent Reminiscent commented Jul 19, 2021

What problem does this PR solve?

Issue Number: close issue#26199

Problem Summary:
Add status vars for 'last_plan_binding_update_time'. We can use show status like 'last_plan_binding_update_time'; to see the last plan binding update time in the server.

What is changed and how it works?

Add status variable to record the last plan binding update time.

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

  • Details of the last plan binding update time are now available in the last_plan_binding_update_time status variables

@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 19, 2021
@Reminiscent
Copy link
Contributor Author

/cc @eurekaka

@ti-chi-bot ti-chi-bot requested a review from eurekaka July 19, 2021 06:57
@Reminiscent
Copy link
Contributor Author

/cc @morgo

@ti-chi-bot ti-chi-bot requested a review from morgo July 19, 2021 06:58
@github-actions github-actions bot added the sig/planner SIG: Planner label Jul 19, 2021
@morgo
Copy link
Contributor

morgo commented Jul 19, 2021

Please fix the linter issues, but otherwise this is looking good:

[2021-07-19T06:59:11.974Z] linting

[2021-07-19T06:59:12.232Z]   ✘  https://revive.run/r#var-naming  don't use underscores in Go names; var update_time should be updateTime  

[2021-07-19T06:59:12.232Z]   bindinfo/bind_test.go:2130:2

[2021-07-19T06:59:12.232Z] 

[2021-07-19T06:59:12.232Z]   ✘  https://revive.run/r#var-naming  don't use underscores in Go names; var update_time1 should be updateTime1  

[2021-07-19T06:59:12.232Z]   bindinfo/bind_test.go:2132:2

[2021-07-19T06:59:12.232Z] 

[2021-07-19T06:59:12.232Z]   ✘  https://revive.run/r#var-naming  don't use underscores in Go names; var update_time2 should be updateTime2  

[2021-07-19T06:59:12.233Z]   bindinfo/bind_test.go:2135:2

[2021-07-19T06:59:12.233Z] 

[2021-07-19T06:59:12.233Z] ✘ 3 problems (3 errors, 0 warnings)

[2021-07-19T06:59:12.233Z] 

[2021-07-19T06:59:12.233Z] Errors:

[2021-07-19T06:59:12.233Z]   3  var-naming  

@Reminiscent
Copy link
Contributor Author

@morgo Update, PTAL. Besides, @eurekaka thinks that the name stat.go will be ambiguous with the naming of statistics in the optimizer. What do you think?

@ti-chi-bot
Copy link
Member

@morgo: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

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.

bindinfo/bind_test.go Outdated Show resolved Hide resolved
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 27, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • eurekaka
  • rebelice

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 27, 2021
@Reminiscent
Copy link
Contributor Author

@eurekaka Update. PTAL

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 3, 2021
@eurekaka
Copy link
Contributor

eurekaka commented Aug 3, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: b1fa991

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 3, 2021
@ti-chi-bot ti-chi-bot merged commit ec8351c into pingcap:master Aug 3, 2021
@Reminiscent Reminiscent mentioned this pull request Aug 4, 2021
12 tasks
@Reminiscent Reminiscent deleted the bindingStats branch August 5, 2021 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic/sql-plan-management sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support the status variable @@last_plan_binding_update_time for SPM
5 participants