Skip to content

branch-4.2: [fix](fe) Guard fragment cleanup until dispatch completes #66767 - #70328

Open
github-actions[bot] wants to merge 1 commit into
branch-4.2from
auto-pick-66767-branch-4.2
Open

github-actions[bot] wants to merge 1 commit into
branch-4.2from
auto-pick-66767-branch-4.2

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Cherry-picked from #66767

Production stress-test logs captured the lifecycle race for a load
query. At
13:35:52.506, BE received `FINISHED` and destroyed Query Context
`6aa1098800c457e-bad0398f81aa610f`. About 61 ms later, its phase-two
`exec_plan_fragment_start` RPC arrived and failed with `Failed to get
query fragments context`,
causing the INSERT SELECT to fail. Root cause: FE could broadcast
successful cleanup as soon as
execution completion was reported, without waiting for all fragment
dispatch RPCs to finish. This
change delays `FINISHED` cleanup until both execution and fragment
dispatch complete. It also
ensures that if the dispatch deadline has already expired after RPC
futures were submitted, FE
records the error and actively cancels the coordinator so prepared or
running backend contexts are
not left behind until backend timeout.

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
@github-actions
github-actions Bot requested a review from yiguolei as a code owner November 6, 2026 04:52
@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?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

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