github-actions[bot] commented on code in PR #70708:
URL: https://github.com/apache/doris/pull/70708#discussion_r4661287201


##########
be/src/exec/pipeline/pipeline_task.cpp:
##########
@@ -266,6 +266,19 @@ Status PipelineTask::_open() {
     SCOPED_CPU_TIMER(_task_cpu_timer);
     SCOPED_TIMER(_open_timer);
     _dry_run = _sink->should_dry_run(_state);
+    RETURN_IF_ERROR(_extract_dependencies());

Review Comment:
   [P1] Avoid publishing sink dependencies before they are initialized
   
   This new extraction copies the sink's write dependencies before `open()`, 
when both `GroupCommitBlockSinkLocalState` pointers are null. A concrete 
trigger is an async group-commit load rejected by `_check_wal_backlog()` with 
`EXCEEDED_LIMIT`: sink `open()` returns that error, the second extraction is 
skipped, and `close_task()` cancels the query. 
`PipelineFragmentContext::cancel()` then calls `unblock_all_dependencies()`, 
whose write-dependency loop dereferences the cached nulls and crashes the BE 
instead of returning the backlog error. Assigning the sink members during 
`open()` does not update those copied pointers; cancellation during opening 
hits the same window. Limit pre-open inspection to initialized read 
dependencies (or initialize all published sink dependencies earlier), and cover 
this real sink lifecycle in the cancellation/open-failure tests.



-- 
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]

Reply via email to