sourcemanager(ticdc): close all pullers asyncrhonsly to prevent block too long
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
/retest
/retest
/retest
[LGTM Timeline notifier]
Timeline:
2025-01-22 06:18:42.320436501 +0000 UTC m=+248049.651355902: :ballot_box_with_check: agreed by asddongmen.2025-01-22 06:20:14.93735494 +0000 UTC m=+248142.268274336: :ballot_box_with_check: agreed by wk989898.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: asddongmen, wk989898
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [asddongmen,wk989898]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment