raghav-reglobe opened a new pull request, #67033:
URL: https://github.com/apache/doris/pull/67033
### What problem does this PR solve?
Issue Number: close #67031
Related PR: #67032
Problem Summary:
`QueryTaskController::revoke_memory` sizes its `SpillContext` to the number
of chosen tasks and relies on every task eventually calling
`on_task_finished()`. If `PipelineTask::revoke_memory` fails to submit the
`RevokableTask` for the Nth chosen task, the old `RETURN_IF_ERROR` aborted the
loop: the failed task and the unsubmitted remainder never reach
`do_revoke_memory`, so the `SpillContext` never completes, its completion
callback never fires `set_memory_sufficient(true)`, and the query blocks on
`_memory_sufficient_dependency` forever — a silent per-query hang whose
piled-up sessions can starve the BE.
On a submit error, call `on_task_finished()` for the failed task and every
remaining unsubmitted task before returning the error; the caller
(`handle_single_query_`) still cancels the query on the returned status.
Adds `TEST_SPILL_CONTEXT_REQUIRES_FULL_ACCOUNTING` documenting the
completion contract.
### Release note
Fix a permanent query hang when a spill revocation task fails to submit.
### Check List (For Author)
- Test
- [x] Unit Test
- Behavior changed:
- [x] No.
- Does this need documentation?
- [x] No.
--
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]