Skip to content

[fix](pipeline) Reject mismatched pipeline task counts - #67499

Open
Mryange wants to merge 1 commit into
apache:masterfrom
Mryange:check-pipeline-task-count
Open

[fix](pipeline) Reject mismatched pipeline task counts#67499
Mryange wants to merge 1 commit into
apache:masterfrom
Mryange:check-pipeline-task-count

Conversation

@Mryange

@Mryange Mryange commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Pipeline-breaking operators require matching sink and source task counts unless a local exchange explicitly redistributes concurrency. A mismatch could leave source dependencies uninitialized and crash during execution. This change validates all in-fragment sink/source pairs after local exchange planning and rejects invalid plans before PipelineTask creation.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

### What problem does this PR solve?

Issue Number: N/A

Problem Summary: Non-local-exchange operators that split a plan node across two pipelines require one-to-one sink and source tasks. A mismatched task count can leave the paired source dependency uninitialized and crash later during pipeline execution. Validate every in-fragment sink destination after local exchange planning and reject mismatched task counts before pipeline preparation and task creation. Local exchanges remain exempt because they intentionally redistribute between different concurrency levels.

### Release note

Reject invalid pipeline plans with mismatched sink and source task counts before execution.

### Check List (For Author)

- Test: Manual test
    - Built BE and FE successfully.
    - Ran the original RQG SQL with its session variables and verified the mismatch is rejected before execution while FE and BE remain alive.
    - Focused unit tests were added but not run separately.
- Behavior changed: Yes. Invalid non-local-exchange pipeline task counts now return an internal error before execution.
- Does this need documentation: No.
@Mryange

Mryange commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Mryange

Mryange commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 63.02% (29553/46892)
Line Coverage 48.06% (309892/644742)
Region Coverage 43.64% (250340/573627)
Branch Coverage 45.24% (116520/257574)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.33% (34668/45418)
Line Coverage 61.37% (391149/637379)
Region Coverage 57.54% (328788/571443)
Branch Coverage 58.38% (149949/256835)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants