Skip to content

Commit 01854b1

Browse files
committed
### feature:
### optimize: ### bug-fix: delete redundant codes
1 parent 5784a81 commit 01854b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/circuitbreaker/rule.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ func (r *Rule) ResourceName() string {
103103
return r.Resource
104104
}
105105

106-
// check whether the new rule is consistent with the old rule , it should compare every field except Rule.Id
106+
// Check whether the fields shared by all rule strategy types are consistent
107107
func (r *Rule) isEqualsToBase(newRule *Rule) bool {
108108
if newRule == nil {
109109
return false
110110
}
111111
return r.Resource == newRule.Resource && r.Strategy == newRule.Strategy && r.RetryTimeoutMs == newRule.RetryTimeoutMs &&
112112
r.MinRequestAmount == newRule.MinRequestAmount && r.StatIntervalMs == newRule.StatIntervalMs && r.StatSlidingWindowBucketCount == newRule.StatSlidingWindowBucketCount &&
113-
r.MaxAllowedRtMs == newRule.MaxAllowedRtMs && r.Threshold == newRule.Threshold && r.ProbeNum == newRule.ProbeNum
113+
r.ProbeNum == newRule.ProbeNum
114114
}
115115

116116
func (r *Rule) isEqualsTo(newRule *Rule) bool {

0 commit comments

Comments
 (0)