-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: support tidb_redact_log for explain #54553
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #54553 +/- ##
=================================================
- Coverage 72.7518% 56.0782% -16.6736%
=================================================
Files 1555 1680 +125
Lines 437652 615001 +177349
=================================================
+ Hits 318400 344882 +26482
- Misses 99655 246673 +147018
- Partials 19597 23446 +3849
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/ok-to-test |
/retest |
1 similar comment
/retest |
c8a1e5a
to
d396baa
Compare
/retest |
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.
/approve
/retest |
Signed-off-by: Weizhen Wang <[email protected]>
/hold |
@qw4990 PTAL, Please confirm that it will not affect the plan cache. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, lance6716, qw4990, tangenta, windtalker, xhebox 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 |
/unhold |
/retest |
/cherrypick release-8.1 |
Signed-off-by: ti-chi-bot <[email protected]>
@hawkingrei: new pull request created to branch 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. |
Signed-off-by: ti-chi-bot <[email protected]>
@hawkingrei: new pull request created to branch 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. |
Signed-off-by: ti-chi-bot <[email protected]>
What problem does this PR solve?
Issue Number: close #54565
Problem Summary:
What changed and how does it work?
The main issue is that TiDB's explain function does not support tidb_redact_log, which has caused this problem to occur.
Due to the substantial size of this PR, I will outline the modifications made and the tests conducted.
The changement of
StringCtx
StringCtx
is used to generate information in the explain function and is also utilized in log generation. Therefore, it cannot directly readctx
to determine the redact mode.So the changement of expression package is to add the
redact
parameter intoStringCtx
and force using theredactDisable
mode when to raise the error.so I refactor the
StringWithCtx
's implementation ofConstant
,Column
. butplanner/core.ToString/StringifyExpressionsWithCtx
is to print the debug info for testing. so it forces to use theredactDisable
pkg/util/ranger/types.go
is to support the redact for theranger
.the changement of the
planner
The main focus is on the physical operator to resolve the explain output. The primary modifications include enabling the expression to support redaction by passing the redact parameter into the expression's explain method. Additionally, some parameters of the operator itself are subjected to redaction.
the changement of the
ranger
Enable the range to support redaction mode.
the main test cases
- avoid plan cache polluting by the redact.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.