mrhhsg commented on code in PR #70419:
URL: https://github.com/apache/doris/pull/70419#discussion_r4650385600
##########
be/src/exec/pipeline/pipeline_fragment_context.cpp:
##########
@@ -598,10 +621,7 @@ Status
PipelineFragmentContext::_build_pipeline_tasks(ThreadPool* thread_pool) {
}
auto pipeline_id_to_profile =
_runtime_state->build_pipeline_profile(_pipelines.size());
- if (target_size > 1 &&
- (_runtime_state->query_options().__isset.parallel_prepare_threshold &&
- target_size >
_runtime_state->query_options().parallel_prepare_threshold)) {
- // If instances parallelism is big enough ( >
parallel_prepare_threshold), we will prepare all tasks by multi-threads
Review Comment:
Addressed in cb40794c9e1c97e97c5e55dc97032d76714fbebc.
Parallel preparation now uses a per-invocation `CONCURRENT` token, declared
after the status vector and latch. A submission error unwinds that token first:
it removes pending callbacks (including a callback queued before failed worker
bootstrap) and waits for active callbacks before any captured local or fragment
state can expire. The successful path retains its completion latch. Cleanup
does not shut down the shared pool or cancel unrelated tokens.
The general ThreadPool admission/worker-lifecycle implementation is
unchanged; its only edit is a test injection point at `create_thread()`. The
new `PipelineTest.ParallelPrepareWorkerBootstrapFailure` fails on the previous
caller with one callback still queued, passes with this fix, and verifies
subsequent pool recovery. The final focused ASAN Pipeline/ThreadPool/token
suites passed 40/40 tests. Modified-line clang-tidy, formatting and
build-hygiene checks also passed.
The PR description now distinguishes this caller-side fix from the
still-separate generic pool contract. No fresh SQL/cloud/mixed-version/full-CI
result is claimed. The PR remains Draft; no `/review` trigger or approval claim
was added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]