AlexStocks commented on PR #3687: URL: https://github.com/apache/dubbo-go/pull/3687#issuecomment-5629038565
## Review 结果(只读审计,基于 Head ef1f95a8 / Base 832124aa) 已执行:完整 Diff 审查、exact Head 本地复现(`make fmt`、`go test ./common/extension`、`go test -race ./common/extension`、`go test ./client ./server .` 的扩展相关用例、`go vet`,全部通过)。 ### [P1] CI Format required check 失败 `make fmt`(modernize v0.21.1 + imports-formatter)在 `common/extension/config_loader.go` 会产生 3 处改动(`strings.HasPrefix/TrimPrefix` → `strings.CutPrefix`;`strings.Split` → `strings.SplitSeq`),导致 CI "Verify formatter output" 退出码 1,`mergeable_state=unstable`。本地已在 exact Head 复现同样 diff。**请运行 `make fmt` 并提交转换结果。** ### [P2] `options.go:120` InstanceScope 下 filter 名被校验但结果丢弃 `collectFilterNames` 对 InstanceScope 仍强制 `HasFilter` 校验,但 `InstanceOptions.init` 丢弃返回值(Instance 不消费 filter)。扩展在 `FilterNames(InstanceScope)` 返回未注册 filter 名会导致 `NewInstance` 失败。建议 InstanceScope 跳过该校验,或文档明确要求 InstanceScope 返回 nil。 ### [P2] `config_loader.go:111` 多扩展初始化无回滚 按序初始化中第 N 个失败时,前 N-1 个已执行 `Init(scope)`,无清理路径;调用方重试会重复触发已成功扩展的 `Init`(goroutine/连接/全局状态副作用)。建议文档明确 fail-fast 语义或提供清理约定。 ### [P2] `loader.go:175` 热更新不重新初始化扩展 `hotUpdateConfig` 更新了 `extensionConfigs`,但运行中的 Instance 不会重新执行扩展初始化,`dubbo.extensions` 变更被静默忽略。建议检测 extensions 变更并拒绝热更新,或文档声明不支持。 其余核验:Config 原型/New 独立性、Option 顺序、scope 选择、`MergeFilterNames` 与下游 `MergeValue/removeMinus` 的 `-name` 抑制语义闭环、Registry 并发安全(RLock/Lock)、YAML 点分 key 保留、测试隔离(t.Cleanup)均确认无问题。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
