Repository navigation
fix(tasks): 移除文件任务存储的统一 I/O 限流 - #6265
Merged
qin-ctx merged 1 commit intoOct 19, 2026
Merged
Conversation
Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
qin-ctx
approved these changes
Oct 19, 2026
hezhang-1216
pushed a commit
that referenced
this pull request
Oct 29, 2026
Co-authored-by: qin-ptr <222410531+qin-ptr@users.noreply.github.com> Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
移除
PersistentTaskStore将文件读取、列目录、写入、建目录和删除共用的 8 并发限制,避免列表读取占满名额后阻塞任务状态写入。此 PR 基于main当前的 Task/Work 存储实现,承接 #6261 的优化目标。同一个存储实例中,8 次列表查询正在等待任务文件读取,此时启动一个已经缓存的 pending 任务:
同一任务的串行更新,以及写入完成、发布缓存后再传播调用方取消的语义保持不变。
Human Involvement
Related Issue
无关联 issue。对应已合入 hotfix 分支的 #6261;本 PR 按
main当前的存储职责实现。Type of Change
Changes Made
PersistentTaskStore._io、StoreIOLimiter及内部构造参数max_concurrent_io,各文件操作直接调用原有run_to_completion。max_concurrent_store_io参数及现有测试中的参数传递。Testing
以下现有测试共 99 个通过:
LITELLM_LOCAL_MODEL_COST_MAP=True python -m pytest -o addopts='' -q \ tests/test_task_tracker_concurrency.py \ tests/test_task_tracker.py \ tests/test_task_backend_config.py \ tests/service/test_task_work_contract.py \ tests/server/test_compile_studio.py --tb=short聚焦 A/B 复现使用真实 TaskTracker / PersistentTaskStore 和内存文件 fixture:让 8 次列表查询停在文件读取处,再启动已缓存的任务。基线在 500 ms 观察窗口内未完成状态写入;修改后在释放读取前完成,最终状态均为 running。这验证限流等待的消除,不是生产存储性能基准。
5 个改动文件的 Ruff check 和
git diff --check通过。4 个文件的格式检查通过;tests/test_task_tracker_concurrency.py在 main 基线已有同样的格式差异,本 PR 保留该处原样。Checklist
Screenshots (if applicable)
不适用。
Additional Notes
移除的是任务文件存储层的统一并发上限。底层存储及线程池仍可能排队;本 PR 不改变列表扫描方式,也不宣称解决生产环境全部延迟。