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

planner: move debugtracer logic and handle col defition to util pkg #52681

Closed

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Apr 17, 2024

What problem does this PR solve?

Issue Number: ref #51664, ref #52714

Problem Summary:

What changed and how does it work?

handlecol and debugtrace are quite two dependent mod, we should move both parts output of core pkg.

Otherwise, if we want to move physical/logical operators out of core/pkg, this handlecol and debugtrace reference inside these operators will transitively depend on core/pkg too, leading to de-coupling work hard to process.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

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

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: AilinKid <314806019@qq.com>
.
Signed-off-by: AilinKid <314806019@qq.com>
@ti-chi-bot ti-chi-bot bot added release-note-none sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 17, 2024
Copy link

tiprow bot commented Apr 17, 2024

Hi @AilinKid. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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/test-infra repository.

.
Signed-off-by: AilinKid <314806019@qq.com>
.
Signed-off-by: AilinKid <314806019@qq.com>
.
Signed-off-by: AilinKid <314806019@qq.com>
.
Signed-off-by: AilinKid <314806019@qq.com>
.
Signed-off-by: AilinKid <314806019@qq.com>
.
Signed-off-by: AilinKid <314806019@qq.com>
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

Merging #52681 (cbd2b63) into master (ecb8a9e) will increase coverage by 2.0563%.
Report is 9 commits behind head on master.
The diff coverage is 93.8461%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52681        +/-   ##
================================================
+ Coverage   72.3357%   74.3920%   +2.0563%     
================================================
  Files          1471       1473         +2     
  Lines        427132     427934       +802     
================================================
+ Hits         308969     318349      +9380     
+ Misses        98881      89741      -9140     
- Partials      19282      19844       +562     
Flag Coverage Δ
integration 48.9639% <67.6923%> (?)
unit 71.1789% <93.8461%> (-0.0483%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 49.7200% <ø> (+8.6300%) ⬆️

@@ -502,6 +503,29 @@ func GetPreparedStmt(stmt *ast.ExecuteStmt, vars *variable.SessionVars) (*PlanCa
return nil, plannererrors.ErrStmtNotFound
}

func init() {
debugtrace.GetPreparedStmt = GetPreparedStmt4DebugTrace
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this part is about avoiding debugTrace pkg depending on core.PlanCacheStmt. Only core pkg use debugTrace pkg is reasonable.

*/

// GetStatsTblInfo is used for debug trace of getStatsTable
type GetStatsTblInfo struct {
Copy link
Contributor Author

@AilinKid AilinKid Apr 18, 2024

Choose a reason for hiding this comment

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

move stats-related definitions to a unified place.
I saw StatsTblTraceInfo defined here, so I moved it here too. If this one is in core, any place that uses this structure will strongly depend on core too.

Copy link

ti-chi-bot bot commented Apr 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

ti-chi-bot bot commented Apr 18, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-18 09:01:28.391413545 +0000 UTC m=+501507.502459995: ☑️ agreed by hawkingrei.

@AilinKid AilinKid closed this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved needs-1-more-lgtm release-note-none sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants