-
Notifications
You must be signed in to change notification settings - Fork 6.1k
planner: increase default tidb_stmt_summary_max_sql_length and better error #63694
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
planner: increase default tidb_stmt_summary_max_sql_length and better error #63694
Conversation
|
Hi @mjonss. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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-sigs/prow repository. |
|
/check-issue-triage-complete |
|
/retest |
|
@mjonss Please fix the CI. |
|
/retest |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #63694 +/- ##
================================================
+ Coverage 72.7311% 73.9752% +1.2441%
================================================
Files 1848 1849 +1
Lines 498587 505327 +6740
================================================
+ Hits 362628 373817 +11189
+ Misses 113927 109642 -4285
+ Partials 22032 21868 -164
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
|
@mjonss: Cannot trigger testing until a trusted user reviews the PR and leaves an 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 kubernetes-sigs/prow repository. |
henrybw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be fine: I don't think it will add significantly more memory pressure overall. (And if it does turn out to be a problem, we can turn down the default later.)
| return nil, errors.NewNoStackErrorf("binding failed: SQL query is truncated due to tidb_stmt_summary_max_sql_length limit. "+ | ||
| "Please increase tidb_stmt_summary_max_sql_length. Plan Digest: %v", planDigest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider using the vardef.TiDBStmtSummaryMaxSQLLength constant instead of hardcoding tidb_stmt_summary_max_sql_length in the error message, but I don't consider it a blocking issue.
|
/unhold |
yudongusa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also open a document PR
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: henrybw, terry1purcell, wddevries, yudongusa 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 |
What problem does this PR solve?
Issue Number: close #63671
Problem Summary:
For queries longer than 4096 characters, it will be truncated in the statements_summary tables, resulting in CREATE GLOBAL BINDING FROM HISTORY USING PLAN DIGEST '' does not work, and it gives a cryptic error from the parser.
What changed and how does it work?
Increased the default from 4k to 32k and updated the error message, to point to
tidb_stmt_summary_max_sql_lengthglobal system variable, controlling the length.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.