alibaba / sentinel-golang

Sentinel Go enables reliability and resiliency for Go microservices
https://sentinelguard.io/
Apache License 2.0
2.76k stars 431 forks source link

[BUG] 熔断器规则rule 参数 ProbeNum更新,loadRule 后未生效 #563

Open sinceHYJ opened 3 months ago

sinceHYJ commented 3 months ago

Describe what happened

当熔断器的规则配置发生变更时,只调整了probeNum 字段值,然后使用circuitbreaker.LoadRules(rules) 更新熔断器未生效。

Describe what you expected to happen

可能原因: rule isEqualsTo() 判断相等时,未对probeNum 字段进行判断,导致loadrule 时判断规则未发生变更,使用了旧的熔断器,代码位置位于:calculateReuseIndexFor