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

feat: fix and refine execution plan #1568

Merged
merged 10 commits into from
Aug 14, 2023
Merged

Conversation

baurine
Copy link
Collaborator

@baurine baurine commented Aug 11, 2023

What Did

Related PR: #1561

  • Fix export statements fail issue which is caused by incorrect gin router middlewares order (affect version 7.1, 6.5, 6.1) and incorrect logic to generate binary_plan_text field ( close Export statements list failed #1573 )
  • Fix the logic to generate binary_plan_text field
  • Add binary_plan_json field
  • Support download execution plan text
  • Support hide and show execution plan table columns
  • Refactor parse logic to generate execution plan table rows, parse from execution plan text, instead of from execution plan json object
  • Truncate too long text to prevent the render performance issue, showing too long text for user is nonsense

TODO: check the compatibility for old tidb versions (5.x, 6.x, 7.x)

Test

  • Compatibility: 7.1.0, 6.5.3, 6.1.7, 5.4.3
  • i18n: English, Chinese
  • Export Statement / Slow Query list
  • Plan table and text are same content
  • Copy, download, hide columns

Test result:

  • All version works fine
  • 6.1.7, 5.4.3 has no binary plan

7.1.0
image

5.4.3
image

Preview

Kapture.2023-08-13.at.20.38.40.mp4

image

image

@ti-chi-bot ti-chi-bot bot requested a review from Renkai August 11, 2023 08:17
@baurine baurine marked this pull request as draft August 11, 2023 08:17
@netlify
Copy link

netlify bot commented Aug 11, 2023

Deploy Preview for tidb-dashboard failed.

Name Link
🔨 Latest commit f876bf7
🔍 Latest deploy log https://app.netlify.com/sites/tidb-dashboard/deploys/64d9d8e1696ea500081da9ac

@netlify
Copy link

netlify bot commented Aug 11, 2023

Deploy Preview for tidb-dashboard-for-dbaas failed.

Name Link
🔨 Latest commit f876bf7
🔍 Latest deploy log https://app.netlify.com/sites/tidb-dashboard-for-dbaas/deploys/64d9d8e1cc31f9000898110e

@ti-chi-bot ti-chi-bot bot added the size/L label Aug 11, 2023
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #1568 (f876bf7) into master (9db0244) will decrease coverage by 1.98%.
The diff coverage is 41.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1568      +/-   ##
==========================================
- Coverage   26.64%   24.67%   -1.98%     
==========================================
  Files          96      168      +72     
  Lines       10342    15079    +4737     
==========================================
+ Hits         2756     3721     +965     
- Misses       7402    11084    +3682     
- Partials      184      274      +90     
Flag Coverage Δ
backend_integration 9.12% <41.17%> (?)
backend_ut 26.58% <0.00%> (-0.07%) ⬇️

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


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9db0244...f876bf7. Read the comment docs.

@baurine baurine force-pushed the chore/fix-refine-execution-plan branch from 5ac762b to 0b0b5b5 Compare August 11, 2023 08:49
@ti-chi-bot ti-chi-bot bot added size/XXL and removed size/L labels Aug 13, 2023
@baurine baurine marked this pull request as ready for review August 13, 2023 13:03
@baurine baurine marked this pull request as draft August 13, 2023 13:09
@baurine baurine requested review from shhdgit and mornyx August 13, 2023 13:09
@baurine
Copy link
Collaborator Author

baurine commented Aug 13, 2023

hi @mornyx @shhdgit , this PR is ready to review, PTAL, thanks~

I make this PR as draft still because I don't want it to be merged automatically before I check the compatibility with the old TiDB versions.

@baurine baurine force-pushed the chore/fix-refine-execution-plan branch from b797b14 to f876bf7 Compare August 14, 2023 07:33
@baurine baurine marked this pull request as ready for review August 14, 2023 07:42
@baurine baurine changed the title chore: fix and refine execution plan feat: fix and refine execution plan Aug 14, 2023
@ti-chi-bot ti-chi-bot bot added the lgtm label Aug 14, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shhdgit

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

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 14, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-08-14 07:55:12.080753014 +0000 UTC m=+531276.629768986: ☑️ agreed by shhdgit.

@ti-chi-bot ti-chi-bot bot added the approved label Aug 14, 2023
@ti-chi-bot ti-chi-bot bot merged commit 9752633 into master Aug 14, 2023
9 of 18 checks passed
@ti-chi-bot ti-chi-bot bot deleted the chore/fix-refine-execution-plan branch August 14, 2023 07:56
baurine added a commit that referenced this pull request Aug 15, 2023
@baurine baurine linked an issue Aug 15, 2023 that may be closed by this pull request
baurine added a commit that referenced this pull request Sep 11, 2023
baurine added a commit that referenced this pull request Sep 11, 2023
* feat(execution-plan): refine execution plan (#1561)

* chore(binary-plan): truncate long operator info for execution plan (#1565)

* feat: fix and refine execution plan (#1568)

* chore(binary-plan): show eye icon to hide column when hover (#1574)

* bump: i18next (#1575)

* Remove PNPM_INSTALL_TAGS=--offline (#1578)

* chore: upgrade node from 16 to 18, pnpm from 7 to 8 (#1580)

* feat(conprof): show conprof download link for TiCDC (#1581)

* keyvisual: use scanRegions instead of fetch all regions (#1579)

* feat(resource-control): show resource control entry for clinic (#1582)

* feat(debug-api): support pagination for ddl history (#1584)

* feat(security): encrypt login password (#1583)

* chore: update swaggo (#1585)

* test(login): fix login integration test (#1587)

* update release version to 2023.09.11.1

---------

Co-authored-by: Suhaha <jklopsdfw@gmail.com>
Co-authored-by: Yifan Xu <xuyifan02@pingcap.com>
Co-authored-by: ShuNing <nolouch@gmail.com>
Co-authored-by: Yexiang Zhang <mornyx.z@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export statements list failed
3 participants