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

ddl: query since min job id to mitigate slowness due to un-compacted deleted kv #54122

Merged
merged 5 commits into from
Jun 20, 2024

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Jun 19, 2024

What problem does this PR solve?

Issue Number: ref #53246

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

after #54003 we have optimized create 100K tables under same database on owner node on 1pd/3tidb/3tikv using 10 threads from 50m -> 38m33, as we have reduced the number of query for each job from 2 to 1

after this pr, on same env, it takes 34m58

  • 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

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 19, 2024
Copy link

tiprow bot commented Jun 19, 2024

Hi @D3Hunter. 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-sigs/prow repository.

@D3Hunter D3Hunter mentioned this pull request Jun 19, 2024
18 tasks
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 65.67164% with 23 lines in your changes missing coverage. Please review.

Project coverage is 56.2394%. Comparing base (d0e775d) to head (648db72).
Report is 7 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54122         +/-   ##
=================================================
- Coverage   74.8008%   56.2394%   -18.5615%     
=================================================
  Files          1516       1639        +123     
  Lines        360897     607115     +246218     
=================================================
+ Hits         269954     341438      +71484     
- Misses        71336     242373     +171037     
- Partials      19607      23304       +3697     
Flag Coverage Δ
integration 37.2240% <90.6250%> (?)
unit 71.9778% <65.6716%> (-1.7086%) ⬇️

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

Components Coverage Δ
dumpling 52.9656% <ø> (-2.2339%) ⬇️
parser ∅ <ø> (∅)
br 52.6966% <ø> (+4.7265%) ⬆️

@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jun 19, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jun 19, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Jun 20, 2024

@lance6716 it seems most speedup comes from remove the sub-query inside getJobSQL which i have reverted in this pr as it handles "fair lock" which is changed in your pr #54110. remove this sub-query requires us handle fair across job type, i will file another pr to remove this sub-query

i have update the test result in desc, it's 38m33 -> 34m58 now.

pkg/ddl/systable/manager_test.go Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 20, 2024
Copy link

ti-chi-bot bot commented Jun 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, tangenta

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 ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 20, 2024
Copy link

ti-chi-bot bot commented Jun 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-20 06:22:37.224787254 +0000 UTC m=+268683.710276088: ☑️ agreed by lance6716.
  • 2024-06-20 07:02:56.525501806 +0000 UTC m=+271103.010990638: ☑️ agreed by tangenta.

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Jun 20, 2024

/retest

there is a flaky TestParallelFlashbackTable case, will check it later, #54134, retest first

Copy link

tiprow bot commented Jun 20, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

there is a flaky TestParallelFlashbackTable case, will check it later, retest first

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.

@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jun 20, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@ti-chi-bot ti-chi-bot bot merged commit a33a868 into pingcap:master Jun 20, 2024
23 checks passed
@D3Hunter D3Hunter deleted the query-with-min-id branch June 20, 2024 09:43
D3Hunter added a commit to D3Hunter/tidb that referenced this pull request Jun 24, 2024
@D3Hunter D3Hunter mentioned this pull request Jun 24, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants