AlexStocks commented on code in PR #3439:
URL: https://github.com/apache/dubbo-go/pull/3439#discussion_r3610089405


##########
cluster/cluster/base/cluster_invoker.go:
##########
@@ -42,15 +43,15 @@ import (
 type BaseClusterInvoker struct {
        Directory      directory.Directory
        AvailableCheck bool
-       Destroyed      *atomic.Bool
-       StickyInvoker  base.Invoker
+       Destroyed      *uberatomic.Bool
+       StickyInvoker  atomic.Pointer[base.Invoker]

Review Comment:
   [P1] 不要在 v3 补丁版本中改变已发布的导出 API
   `BaseClusterInvoker.StickyInvoker` 和 `NewBaseClusterInvoker` 已随 
`v3.3.2-20260709` 发布。外部消费者在该版本可将 `StickyInvoker` 作为 `base.Invoker` 
使用,并把构造函数结果赋给 `BaseClusterInvoker` 值;同一探针替换为当前 Head 后分别因字段变成 
`atomic.Pointer[base.Invoker]`、构造函数变成 `*BaseClusterInvoker` 
而编译失败。现有旧评论针对的是更早的“字段改为未导出”实现,当前类型变化仍是独立的源码兼容性破坏。建议在 v3 
保留原签名并通过不改变导出符号的内部状态实现竞态修复,或将该 breaking change 延后到下一个 major,并补外部消费者编译门禁。



-- 
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]

Reply via email to