Skip to content

Commit

Permalink
Remove error output of rateLimiter
Browse files Browse the repository at this point in the history
Tons of useless output generated
  • Loading branch information
cannium committed Apr 24, 2020
1 parent be7d045 commit 941d20e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require (
github.com/confluentinc/confluent-kafka-go v1.0.0 //ct
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dustin/go-humanize v1.0.0
github.com/go-redis/redis/v7 v7.0.0-beta.4
github.com/go-redis/redis/v7 v7.2.0
github.com/go-redis/redis_rate/v8 v8.0.0
github.com/go-sql-driver/mysql v1.4.1
github.com/golang/snappy v0.0.1
Expand Down
3 changes: 0 additions & 3 deletions meta/qos.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func (m *QosMeta) AllowReadQuery(bucketName string) (allow bool) {
// the key actually used in redis would have a prefix "rate:"
result, err := m.rateLimiter.Allow(key, redis_rate.PerSecond(qps))
if err != nil {
helper.Logger.Error("AllowReadQuery:", err)
return true
}
return result.Allowed
Expand All @@ -69,7 +68,6 @@ func (m *QosMeta) AllowWriteQuery(bucketName string) (allow bool) {
// the key actually used in redis would have a prefix "rate:"
result, err := m.rateLimiter.Allow(key, redis_rate.PerSecond(qps))
if err != nil {
helper.Logger.Error("AllowWriteQuery:", err)
return true
}
return result.Allowed
Expand Down Expand Up @@ -154,7 +152,6 @@ func (t *throttler) maybeWaitTokenN(n int) {
result, err := t.rateLimiter.AllowN(key,
redis_rate.PerSecond(t.kbpsLimit*1024), n)
if err != nil {
helper.Logger.Error("ThrottleReader:", err)
return
}
if result.Allowed {
Expand Down

0 comments on commit 941d20e

Please sign in to comment.