Skip to content

Commit

Permalink
overrides checks for nil tenant limits on AllByUserID (#4687) (#4690)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4d8009c)

Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
  • Loading branch information
grafanabot and owen-d authored Nov 8, 2021
1 parent 278eb66 commit 772fc4d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/validation/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,12 @@ func NewOverrides(defaults Limits, tenantLimits TenantLimits) (*Overrides, error
}, nil
}

func (o *Overrides) AllByUserID() map[string]*Limits { return o.tenantLimits.AllByUserID() }
func (o *Overrides) AllByUserID() map[string]*Limits {
if o.tenantLimits != nil {
return o.tenantLimits.AllByUserID()
}
return nil
}

// IngestionRateStrategy returns whether the ingestion rate limit should be individually applied
// to each distributor instance (local) or evenly shared across the cluster (global).
Expand Down

0 comments on commit 772fc4d

Please sign in to comment.