Skip to content

Commit

Permalink
Merge pull request #14 from verygoodsecurity/override-stats-fix
Browse files Browse the repository at this point in the history
Fix memory leak related to stats collection
  • Loading branch information
Zinovii Dmytriv authored Aug 2, 2021
2 parents 05f6e87 + 557e8bb commit df167d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/config/config_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ func (this *rateLimitConfigImpl) GetLimit(
}

if descriptor.GetLimit() != nil {
rateLimitKey := domain + "." + this.descriptorToKey(descriptor)
//rateLimitKey := domain + "." + this.descriptorToKey(descriptor)
// when ip is unique for each request it generates too many stats counters and never cleans them up
rateLimitKey := domain + ".override"
rateLimitOverrideUnit := pb.RateLimitResponse_RateLimit_Unit(descriptor.GetLimit().GetUnit())
rateLimit = NewRateLimit(
descriptor.GetLimit().GetRequestsPerUnit(),
Expand Down

0 comments on commit df167d4

Please sign in to comment.