Disagg: Wait tasks in thread pool finished before return#9382
Merged
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom Aug 28, 2024
Merged
Disagg: Wait tasks in thread pool finished before return#9382ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
Conversation
Lloyd-Pottiger
approved these changes
Aug 28, 2024
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CalvinNeo, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
[LGTM Timeline notifier]Timeline:
|
JinheLin
added a commit
that referenced
this pull request
Sep 3, 2024
ref #9378 Co-authored-by: Lloyd-Pottiger <60744015+Lloyd-Pottiger@users.noreply.github.com>
This was referenced Sep 3, 2024
Disagg: Reduce the number of threads created for handling disaggregated requests (release-8.1)
#9402
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: ref #9378
Problem Summary:
If exception thrown in building read tasks, exception will propagate by the future object, and the request will abort immediately.
tiflash/dbms/src/Storages/StorageDisaggregatedRemote.cpp
Lines 102 to 106 in 9afd0b2
However, there are many tasks running in the thread pool and these task has caught many local variables by reference. If the request aborted before these tasks finished, these reference will be dangling.
What is changed and how it works?
Wait the tasks in the thread pool finished before return like before
tiflash/dbms/src/Storages/StorageDisaggregatedRemote.cpp
Lines 223 to 225 in e6fc04a
Check List
Tests
Side effects
Documentation
Release note