Stale worker claim blocks actor resume after increasing template resources

未关闭
#3,311 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
1-2 天
新手友好度
47/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go
领域
backend, databases

调研方向

Trace actor resume, stale-claim recovery, worker binding, and assignment reconciliation to find where capacity failures leave claims behind. Read the linked atomic-assignment issue #1639 for context, then follow the relevant tests for resume retries and worker capacity. Done when a failed re-bind releases the stale claim and a later resume can schedule onto a worker with enough capacity.

由索引模型根据 Issue 内容生成。

描述

area/api-machinery area/scheduling bug-bash kind/bug

During actor resume, claiming a worker slot and updating the actor's state to RESUMING happen in two separate database transactions. If the resume fails or is interrupted between them, the actor remains SUSPENDED with a leftover worker claim.

If the actor is then updated to a template with larger CPU or memory limits than that worker can fit, every subsequent resume attempt fails:

  1. Stale-claim recovery checks whether the worker matches the template's selector and runtime constraints, without checking resource capacity, so it keeps returning the undersized worker.
  2. Binding the actor to that worker fails the capacity check and rolls back without releasing the stale claim.
  3. Resume retries against the same undersized worker until backoff is exhausted and fails with Aborted.
  4. Background assignment reconciliation ignores claims that were never recorded on the actor status, so the stale claim is never cleaned up. The actor cannot be resumed and the worker slot remains leaked.

When re-binding a recovered stale claim fails due to insufficient capacity, the stale claim should be released so the next attempt schedules the actor onto a worker with enough room. Alternatively, making worker and actor assignment atomic in a single transaction (#1639) eliminates unrecorded stale claims altogether.

主要语言
Go
星标
6.1k
派生
676
平均合并
2 天 41 分钟
30 天内合并 PR
500

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

agent-substrate/substrate 的其他 Issue

查看 agent-substrate/substrate 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。