xiaobaicai66695 commented on issue #1523:
URL: https://github.com/apache/dubbo-admin/issues/1523#issuecomment-5283934682

   在 E2E 验证中,Condition Router v3.1 规则能够正常下发并生效;将同一配置中心节点切换为语义等价的 v3.0 
规则后,consumer 仍在两个 provider 之间随机调用。
   经确认,Admin → ZooKeeper → dubbo-go 配置监听链路正常。问题出在 dubbo-go 的 v3.0 解析函数 
generateConditionsRoute:enabled 与 force 的赋值顺序颠倒。
   (问题代码出现在cluster/router/condition/dynamic_router.go296行左右)
   <img width="1508" height="303" alt="Image" 
src="https://github.com/user-attachments/assets/be2de18d-9480-4f90-b24b-77bbfcac2be1";
 />
   <img width="1259" height="732" alt="Image" 
src="https://github.com/user-attachments/assets/843da43c-ffa6-419d-a26b-116d3bde3a7c";
 />
   
   // 修正前
   force, enable := *routerConfig.Enabled, *routerConfig.Force
   
   // 修正后
   force, enable := *routerConfig.Force, *routerConfig.Enabled
   因此,配置中的:
   enabled: true
   force: false
   修正前会被解释为 enable=false, force=true,导致 DynamicRouter 跳过 v3.0 条件路由,直接使用原始 
invoker 列表。
   修正后重新验证,v3.0 规则能够正常执行,同时验证了从 v3.1 热切换至 v3.0 后规则可正常生效。
   Related issue: apache/dubbo-go#3656
   
   


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