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

sourcemanager(ticdc): close all pullers asyncrhonsly to prevent block too long #11667

Open
wants to merge 4 commits into
base: release-6.5
Choose a base branch
from

Conversation

3AceShowHand
Copy link
Contributor

@3AceShowHand 3AceShowHand commented Oct 17, 2024

What problem does this PR solve?

Issue Number: close #11638

What is changed and how it works?

  • close all pullers asyncronsly

Before this PR, all pullers close in order, one by one, each takes around 0.03 ~ 0.05s, if there are a lot of tables, it would takes a long time.

The following log shows that close 1000 tables takes 50 seconds.

["All pullers have been closed"] [namespace=default] [changefeed=blackhole-test-2] [cost=51.169607168s]

After the PR, the time cost is depend on the slowest table puller, around 0 ~ 2 seconds.

[manager.go:179] ["All pullers have been closed"] [namespace=default] [changefeed=blackhole-test-2] [cost=2.137702035s]

Check List

Tests

  • Unit test
  • Integration test

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

fix the puller resource not closed in time

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 17, 2024
@3AceShowHand
Copy link
Contributor Author

/retest

@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 Oct 17, 2024
@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 17, 2024
@3AceShowHand 3AceShowHand reopened this Oct 21, 2024
Copy link
Contributor

ti-chi-bot bot commented Oct 21, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from 3aceshowhand, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

1 similar comment
Copy link
Contributor

ti-chi-bot bot commented Oct 21, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from 3aceshowhand, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 21, 2024
@3AceShowHand 3AceShowHand changed the title kvclient(ticdc): region worker use local context instead of the global server ctx to control worker pool event handler sourcemanager(ticdc): close all pullers asyncrhonsly to prevent block too long Oct 21, 2024
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Oct 21, 2024
@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 21, 2024
@3AceShowHand
Copy link
Contributor Author

/retest

1 similar comment
@3AceShowHand
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant