Bound request and discovery concurrency and share failed in-flight interpreter probes
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- backend, devtools, performance
调研方向
Start with request handlers in crates/pet/src/jsonrpc.rs, path workers in crates/pet/src/find.rs, Conda fan-out in crates/pet-conda/src/lib.rs, and probe caching in crates/pet-python-utils/src/env.rs; compare the existing helper in crates/pet-core/src/cache.rs. Review dependencies #530, #533, and #536 before selecting a scheduler. Done means bounded, non-deadlocking work, shared success and failure probes, explicit overload and shutdown behavior, and preserved streaming and refresh semantics.
由索引模型根据 Issue 内容生成。
描述
Tracking plan: #528
Priority: P2. Evidence: source-confirmed unbounded fan-out; quantify scaling impact with #533 before selecting limits.
Problem
RPC handlers create an OS thread per request. Discovery creates additional scoped threads per workspace/search path, and Conda discovery creates per-environment workers. Refresh coalescing shares identical work but does not bound unrelated requests, waiting threads, or nested locator fan-out.
Interpreter resolution serializes by cache-entry mutex, but an unsuccessful probe is not published to its existing waiters as a shared result. A burst targeting one failing executable can repeatedly incur the same expensive timeout rather than share one attempt.
Sources: request handlers, path workers, Conda fan-out, probe cache locking, existing single-flight cache helper.
Scope
Introduce bounded request/discovery/process work using the simplest scheduler compatible with streaming results and current platform support. Avoid nested-pool deadlocks and avoid queueing one OS thread per blocked request. Define admission/backpressure, fairness, shutdown, and operation deadlines explicitly; an async-runtime migration is not a prerequisite.
Share the outcome of one in-flight interpreter probe with concurrent waiters, including failure, without permanently negative-caching an executable that may later become valid. Distinguish a caller's deadline from the lifetime of shared work.
Acceptance criteria
- Representative large inventories and request bursts remain within documented worker/process/queue bounds, measured by #533.
- Same-key successful and failing probes execute once per in-flight group; later independent requests can retry failures.
- Different keys can progress concurrently; nested discovery cannot deadlock the scheduler.
- Lightweight control requests remain responsive during slow discovery; overload produces an explicit, documented outcome.
- Shutdown/cancellation does not leak children or leave refresh joiners permanently waiting.
- Locator priority, complete inventory, refresh coalescing, and early streaming remain correct, with no material small-workload latency regression under #531.
Dependencies
Depends on #530 for safe probe lifecycle, #533 for measurable workload/resource bounds, and #536 for coherent request ownership. Coordinate with #535 so moving glob expansion off the dispatcher does not create unbounded traversal threads.
- 主要语言
- Rust
- 星标
- 207
- 派生
- 45
- 平均合并
- 8 小时 19 分钟
- 30 天内合并 PR
- 2
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/python-environment-tools 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/python-environment-tools#525 · 1 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
-
debt
难度 5/5 一周以上 新手友好度 25/100
-
debt
难度 5/5 一周以上 新手友好度 35/100
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
查看 microsoft/python-environment-tools 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
issue
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 88/100
web-infra-dev/rspack#15847 ·