Remove unnecessary wait for MPP tunnel destruction before shutdown (#10313)#10369
Remove unnecessary wait for MPP tunnel destruction before shutdown (#10313)#10369ti-chi-bot wants to merge 1 commit intopingcap:release-8.5from
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@gengliqi This PR has conflicts, I have hold it. |
|
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide. DetailsInstructions 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 ti-community-infra/tichi repository. |
|
@ti-chi-bot: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
This is an automated cherry-pick of #10313
What problem does this PR solve?
Issue Number: ref #10266
Problem Summary:
What is changed and how it works?
After #10299, TiFlash will wait for all MPPTasks to finish before shutdown.
Whether all MPP tasks have finished is determined by checking if
monitored_tasksis empty. InMPPTask,MPPTaskMonitorHelperis the last member to be destructed, and only when it is destructed willremoveMonitoredTaskbe called to remove the task id frommonitored_tasks.MPPTunnels are stored inMPPTunnelSet, and althoughMPPTunnelSetis held by a shared_ptr, there are actually only two references: one directly inMPPTask, and the other inside thestd::unique_ptr<DAGContext>also in MPPTask. Therefore, destroying theMPPTaskwill also destroy theMPPTunnel.Check List
Tests
Side effects
Documentation
Release note