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

session, executor: support setting tidb_enable_stmt_summary in session scope #12308 #12499

Merged
merged 4 commits into from Oct 11, 2019

Conversation

djshow832
Copy link
Contributor

cherry-pick #12308 to release-3.1, with little conflict-resolve


What problem does this PR solve?

Support setting tidb_enable_stmt_summary in session scope. It was only supported in global scope. Actually, session scope here equals server scope, and global scope here equals cluster scope.

What is changed and how it works?

When statement summary is enabled in global scope, it'll work immediately on the current server and work in 2 seconds on the other servers in the cluster.
When statement summary is enabled in session scope, it'll work immediately on the current server, and subsequent settings in the global scope won't work.
If tidb_enable_stmt_summary is set to '' in session scope, then tidb_enable_stmt_summary in global scope works in the current server.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change

Side effects

  • Possible performance regression
  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch

Release Note

  • Support system table performance_schema.events_statements_summary_by_digest. The table is used to summarize statements by digest of statements.

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@coocood coocood left a comment

Choose a reason for hiding this comment

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

LGTM

@coocood coocood added the status/can-merge Indicates a PR has been approved by a committer. label Oct 9, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 9, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Oct 9, 2019

@djshow832 merge failed.

@djshow832
Copy link
Contributor Author

/run-all-tests

4 similar comments
@djshow832
Copy link
Contributor Author

/run-all-tests

@djshow832
Copy link
Contributor Author

/run-all-tests

@djshow832
Copy link
Contributor Author

/run-all-tests

@djshow832
Copy link
Contributor Author

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/session component/util sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. type/new-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants