Skip to content

fix(core): 组件激活快速路径改判完成标记并在 actor 上下文复检 - #953

Merged
AlianBlank merged 1 commit into
mainfrom
fix/issue-673
Nov 1, 2026
Merged

AlianBlank merged 1 commit into
mainfrom
fix/issue-673

Conversation

@AlianBlank

Copy link
Copy Markdown
Collaborator

修复 #673(CODE_REVIEW M24「激活进行中被快速路径提前放行」):

  • BaseComponent 新增 volatile _isActivationCompleted/IsActivationCompleted(与激活开始即置位的 IsActive 区分),InactiveAsync finally 中复位。
  • Actor.GetComponentAgentAsync 快速路径改判 IsActivationCompleted:激活进行中(读库/代理三段回调未完)的外部调用者排队等待,不再提前拿到 agent 访问未加载状态。
  • 新增 ActivateComponentIfNeededAsync:进入 actor 上下文后复检 IsActive(内联嵌套调用直接返回,不递归激活;并发排队的工作单元只执行一次激活)。
  • ActivateComponentAsync 末尾置完成标记(激活失败也视为流程结束,与既有不重试行为一致)。

不采用信号量/单次激活 Task:激活过程中同 actor 内嵌套获取兄弟组件走内联路径会自锁。GetComponentAgentAsync 签名与全部调用方不变。全量 2540/2540 绿;Hotfix.Tests 仅剩 main 既有 7 例失败(与本改动无关)。Closes #673

@AlianBlank
AlianBlank merged commit 00c71fc into main Nov 1, 2026
2 checks passed
@AlianBlank
AlianBlank deleted the fix/issue-673 branch November 1, 2026 12:48
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M24] Actor.GetComponentAgent 激活时缺少互斥,可能重复初始化

1 participant