BiteTheDDDDt opened a new pull request, #63539:
URL: https://github.com/apache/doris/pull/63539

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #61679
   
   Problem Summary: Backport #61679 to branch-4.0. A pipeline task can race 
with downstream early wake-up: one thread may observe `_wake_up_early` as 
false, then another thread sets `_wake_up_early` and unblocks finish 
dependencies, and the first thread later sees `_is_pending_finish()` as false 
and finishes without calling operator `terminate()`. For hash join build tasks 
this can leave runtime filter producers in `WAITING_FOR_SYNCED_SIZE`; during 
close/build, `insert()` expects `WAITING_FOR_DATA` and reports an invalid 
runtime filter producer state. This change moves operator termination after the 
pending-finish check so the second `_wake_up_early` read observes the early 
wake-up and terminates operators before close.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: Unit Test
       - `build-support/check-format.sh be/src/pipeline/pipeline_task.cpp 
be/test/pipeline/pipeline_task_test.cpp`
       - `ninja -C be/build_Release 
src/exec/CMakeFiles/Exec.dir/pipeline/pipeline_task.cpp.o`
       - `ninja -C be/ut_build_ASAN 
src/exec/CMakeFiles/Exec.dir/pipeline/pipeline_task.cpp.o 
test/CMakeFiles/doris_be_test.dir/exec/pipeline/pipeline_task_test.cpp.o 
test/doris_be_test`
       - `be/ut_build_ASAN/test/doris_be_test 
--gtest_filter=PipelineTaskTest.TEST_TERMINATE_RACE_FIX --gtest_print_time=true`
   - Behavior changed: No
   - Does this need documentation: 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]

Reply via email to