[BugFix] reset exist tasks signal in clear_data#7111
[BugFix] reset exist tasks signal in clear_data#7111Jiang-Jia-Jun merged 4 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
fastdeploy-bot
left a comment
There was a problem hiding this comment.
🤖 AI Code Review |
2026-03-31 19:47 CST
📋 Review 摘要
PR 概述:修复 EngineWorkerQueue.clear_data() 未重置 exist_task 信号导致的队列状态不一致问题
变更范围:inter_communicator/engine_worker_queue.py, worker/worker_process.py
影响面 Tag:[Engine] [BugFix]
问题
未发现阻塞性问题。
总体评价
本 PR 修复了队列状态不一致的 bug,代码实现正确,与现有的 set_exist_tasks() 方法逻辑一致。continue 缩进调整和日志级别降级也是合理的优化。建议补充单元测试以覆盖此场景。
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7111 +/- ##
==========================================
Coverage ? 73.98%
==========================================
Files ? 402
Lines ? 56576
Branches ? 8942
==========================================
Hits ? 41856
Misses ? 11780
Partials ? 2940
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
❌ Cherry-pick failed: Conflicts detected when cherry-picking to |
|
❌ Cherry-pick failed: Conflicts detected when cherry-picking to |
Motivation
EngineWorkerQueue.clear_data()cleared queued tasks and resetclient_read_flag, but it did not reset theexist_tasksignal.This could leave the queue in an inconsistent state where
exist_tasks()still returnedtrueafter the task payload had already been cleared. In that case, workers could still enter theget_tasks()path and observean empty task list, which may trigger downstream assertion failures.
This PR fixes the queue state inconsistency by resetting the
exist_tasksignal together with queue cleanup.Modifications
EngineWorkerQueue.clear_data()to reset theexist_tasksignal when clearing the queueUsage or Command
This PR is a bug fix. No new usage is introduced.
Accuracy Tests
This change does not modify model forward logic, kernel behavior, or output generation semantics.
Accuracy impact: none expected.
Checklist