diff --git a/pkg/ratelimit/option.go b/pkg/ratelimit/option.go index f1faac5b5508..a2f474c3ff1d 100644 --- a/pkg/ratelimit/option.go +++ b/pkg/ratelimit/option.go @@ -78,7 +78,11 @@ func UpdateDimensionConfig(cfg *DimensionConfig) Option { return InAllowList } lim, _ := l.limiters.LoadOrStore(label, newLimiter()) - return lim.(*limiter).updateDimensionConfig(cfg) + status := lim.(*limiter).updateDimensionConfig(cfg) + if status&QPSDeleted != 0 && status&ConcurrencyDeleted != 0 { + l.limiters.Delete(label) + } + return status } }