[fix](be) Avoid finalized pipeline task submit crash#64946
Merged
morningman merged 1 commit intoJun 30, 2026
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
### What problem does this PR solve? Issue Number: None Related PR: apache#64899 Problem Summary: Backport apache#64899 to branch-4.0. A runtime filter dependency can submit a pipeline task after close/finalize has started releasing task resources. On branch-4.0, HybridTaskScheduler::submit() calls PipelineTask::is_blockable(), which reads _sink and _operators. This adds a submit gate so terminal close/finalize rejects late hybrid scheduler submits before is_blockable() can touch released resources. ### Release note None ### Check List (For Author) - Test: Unit Test / Static check - build-support/clang-format.sh be/src/pipeline/pipeline_task.cpp be/src/pipeline/pipeline_task.h be/src/pipeline/task_scheduler.cpp be/test/pipeline/pipeline_task_test.cpp && build-support/check-format.sh be/src/pipeline/pipeline_task.cpp be/src/pipeline/pipeline_task.h be/src/pipeline/task_scheduler.cpp be/test/pipeline/pipeline_task_test.cpp - ./run-be-ut.sh --run --filter=PipelineTaskTest.TEST_CLOSED_TASK_REJECTS_HYBRID_SUBMIT_BEFORE_FINALIZE:PipelineTaskTest.TEST_FINALIZED_TASK_REJECTS_HYBRID_SUBMIT - Behavior changed: No - Does this need documentation: No (cherry picked from commit 1533359)
ad030a0 to
314d0c4
Compare
Contributor
Author
|
/review |
Contributor
Author
|
run buildall |
Contributor
There was a problem hiding this comment.
I reviewed PR #64946 across the four changed files and the surrounding pipeline lifecycle paths. I did not find a blocking correctness issue or any inline comment worth submitting.
Critical checkpoints:
HybridTaskScheduler::submit()now checks the submit gate under_blockable_check_lockbefore callingPipelineTask::is_blockable(), so late submits after terminal close/finalize no longer read_sinkor_operators.PipelineTask::close(close_sink=true)andPipelineTask::finalize()close the submit gate before terminal resource release, whileclose(close_sink=false)keeps normal EOS/pending-finish resubmits available.- The new tests cover both close-before-finalize and post-finalize submit paths through the real
HybridTaskScheduler::submit()call, including a counting sink assertion thatis_blockable()is not evaluated after the gate closes. - Existing review context for this PR had no inline threads, and there was no additional user focus beyond the full PR review.
Validation:
git diff --check 5494d4eca3fc5ee0f19f3371a16ed21430c7bf83..314d0c451fc97a6771925d4b4d8ff1a86909258f -- be/src/pipeline/pipeline_task.cpp be/src/pipeline/pipeline_task.h be/src/pipeline/task_scheduler.cpp be/test/pipeline/pipeline_task_test.cpppassed.- I could not run the BE unit tests in this runner because
thirdparty/installed,thirdparty/installed/bin/protoc, andthirdparty/installed/bin/thriftare missing. - I did not rely on local format tooling because this runner has
clang-format18.1.3 while the Doris scripts normally expect clang-format 16.
Subagent conclusions:
optimizer-rewrite: no optimizer/rewrite, semantic-equivalence, or parallel join/aggregate issue found; convergence round 1 returnedNO_NEW_VALUABLE_FINDINGS.tests-session-config: no test/session/config/style issue found; convergence round 1 returnedNO_NEW_VALUABLE_FINDINGS.
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
morningman
approved these changes
Jun 30, 2026
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: None
Related PR: #64899
Problem Summary: Backport #64899 to branch-4.0. A runtime filter dependency can submit a pipeline task after the task has started close/finalize. On branch-4.0, HybridTaskScheduler::submit() calls PipelineTask::is_blockable(), which reads task sink/operator resources that finalize releases. This adds a submit gate so terminal close/finalize rejects late hybrid scheduler submits before is_blockable() can touch released resources.
Release note
None
Check List (For Author)