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: fetch schemas in work pool in case of reporting a error in one goroutine. #55841

Merged
merged 10 commits into from
Sep 9, 2024

Conversation

joccau
Copy link
Member

@joccau joccau commented Sep 4, 2024

What problem does this PR solve?

Issue Number: Ref #54436

Problem Summary:

  • When fetchAllSchemasWithTables gets an error from one goroutine, other routines are not canceled.
  • Use errgroup replace it.

What changed and how does it work?

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

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 4, 2024
@joccau joccau added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 4, 2024
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.

Project coverage is 56.9829%. Comparing base (41c9926) to head (ba97c0b).
Report is 29 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #55841         +/-   ##
=================================================
- Coverage   72.8428%   56.9829%   -15.8600%     
=================================================
  Files          1598       1754        +156     
  Lines        444498     635245     +190747     
=================================================
+ Hits         323785     361981      +38196     
- Misses       100768     248318     +147550     
- Partials      19945      24946       +5001     
Flag Coverage Δ
integration 39.4954% <42.3076%> (?)
unit 71.9614% <92.3076%> (+0.0087%) ⬆️

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

Components Coverage Δ
dumpling 52.9567% <ø> (ø)
parser ∅ <ø> (∅)
br 62.8969% <ø> (+17.1236%) ⬆️

@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 4, 2024
Signed-off-by: joccau <[email protected]>
Signed-off-by: joccau <[email protected]>
@ti-chi-bot ti-chi-bot bot removed do-not-merge/needs-tests-checked do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-linked-issue labels Sep 5, 2024
pkg/domain/domain.go Outdated Show resolved Hide resolved
Signed-off-by: joccau <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 5, 2024
@joccau joccau changed the title ddl: fetch schemas in worker pool ddl: fetch schemas in work pool in case of reporting a error in one goroutine. Sep 5, 2024
pkg/domain/domain.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 5, 2024
Copy link
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

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

rest lgtm

pkg/domain/domain.go Outdated Show resolved Hide resolved
Signed-off-by: joccau <[email protected]>
Copy link

ti-chi-bot bot commented Sep 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 9, 2024
Copy link

ti-chi-bot bot commented Sep 9, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-05 05:34:27.373345085 +0000 UTC m=+508991.891398010: ☑️ agreed by lance6716.
  • 2024-09-09 08:56:56.49355704 +0000 UTC m=+260286.233980974: ☑️ agreed by D3Hunter.

@ti-chi-bot ti-chi-bot bot merged commit 722fbdc into pingcap:master Sep 9, 2024
25 checks passed
@D3Hunter D3Hunter mentioned this pull request Sep 14, 2024
54 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.

4 participants