-
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) #55308
*: support tidb_redact_log for explain (#54553) #55308
Conversation
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-8.1 #55308 +/- ##
================================================
Coverage ? 71.1609%
================================================
Files ? 1466
Lines ? 422878
Branches ? 0
================================================
Hits ? 300924
Misses ? 101441
Partials ? 20513
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
lgtm
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hawkingrei, lance6716, tangenta, windtalker 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 |
This is an automated cherry-pick of #54553
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.