BiteTheDDDDt opened a new pull request, #61679: URL: https://github.com/apache/doris/pull/61679
This pull request addresses a subtle race condition in the pipeline task execution logic and adds a targeted test to verify the fix. The main improvement ensures that operator termination is reliably triggered even in the presence of concurrent state changes, preventing operators from being left in an inconsistent state. Additionally, the pull request introduces a debug point for precise testing and includes minor test code cleanups. **Race condition fix and test coverage:** * Fixed a race condition in `PipelineTask::execute()` by reordering the logic to ensure `terminate()` is always called if required, even when another thread updates task state between checks. Added a debug point to simulate the race for testing. * Added a new test `TEST_TERMINATE_RACE_FIX` in `pipeline_task_test.cpp` that uses the debug point to reliably reproduce and verify the race condition fix, ensuring operator termination is not skipped. **Test infrastructure and cleanup:** * Included `debug_points.h` and `common/config.h` in `pipeline_task_test.cpp` to support debug point injection and configuration toggling for the new test. [[1]](diffhunk://#diff-262afd1bf43b83333335fec0b00b65ab0b0241315fd3ceb98c5b3d568971052fR21) [[2]](diffhunk://#diff-262afd1bf43b83333335fec0b00b65ab0b0241315fd3ceb98c5b3d568971052fR36) * Minor formatting cleanup in an existing test case for readability. -- 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]
