Skip to content

Commit

Permalink
bucket: do not check samples if maxSampleCount == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Giedrius Statkevičius committed Feb 4, 2019
1 parent 96a1ba3 commit cd6cb48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ func (sb *BucketStore) blockSeries(
}
samplesLock.Lock()
*samples += uint64(chk.NumSamples())
if *samples > sb.maxSampleCount {
if sb.maxSampleCount > 0 && *samples > sb.maxSampleCount {
samplesLock.Unlock()
return nil, nil, errors.Wrapf(err, "samples limit reached (have %v, limit is %v)", *samples, sb.maxSampleCount)
}
Expand Down

0 comments on commit cd6cb48

Please sign in to comment.