github-actions[bot] commented on PR #62155:
URL: https://github.com/apache/doris/pull/62155#issuecomment-4198661048
Review summary:
Found 1 issue.
1. be/src/exec/pipeline/dependency.cpp:95
The new recovery branch can call PipelineFragmentContext::cancel() from
the runtime-filter timer thread, but that thread is still created as a raw
std::thread without SCOPED_INIT_THREAD_CONTEXT(). This expands
background-thread work to logging, Status construction, and fragment-wide
cancellation without an attached runtime thread context, which violates
be/src/runtime/AGENTS.md and risks untracked allocations on the exceptional
path.
Critical checkpoint conclusions:
- Goal of the task: Partially accomplished. The wake_up() guard fixes the
finalized-task resubmission crash, and the added unit tests cover the
no-resubmit cases, but the new exception-recovery path introduces a
background-thread context issue.
- Small / clear / focused: Yes. The patch is narrowly scoped to pipeline
wake-up scheduling and tests.
- Concurrency: Reviewed in detail. The task/dependency state-machine change
is directionally correct, lock ordering in the modified hot path looks
consistent, and the scheduler no longer requeues terminated tasks from
wake_up(). The remaining issue is that the new recovery path now performs
fragment cancellation work from a timer thread without an initialized thread
context.
- Special lifecycle / static initialization: Task lifecycle handling for
FINISHED / FINALIZED is improved and the profile update fix is correct. No
static-init issue found.
- Configuration changes: None.
- Compatibility / rolling upgrade: None.
- Parallel code paths: Checked the normal scheduler and hybrid scheduler
submission paths; no additional matching code path needs the same state guard
in this PR.
- Special conditional checks: The new FINISHED / FINALIZED submission guard
is well commented and justified.
- Test coverage: Improved but still incomplete for the new failure-handling
branch. The tests cover the no-resubmit race, but there is still no regression
test for the new wake_up() exception / query-cancel path.
- Observability: Warning logs added for the new recovery branch; sufficient
for this change.
- Transaction / persistence: Not applicable.
- Data-write atomicity / crash safety: Not applicable.
- FE-BE variable propagation: Not applicable.
- Performance: No hot-path regression found in the normal path; the added
heavy recovery work is on an exceptional path.
- Other issues: None beyond the thread-context problem above.
Overall opinion: the core race fix looks correct, but I would address the
background-thread context issue before merging.
--
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]