Use DefaultSamplesPerChunk in tsdb (#12387)

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
This commit is contained in:
zenador 2023-05-24 19:00:21 +08:00 committed by GitHub
parent 905a0bd63a
commit 37e5249e33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -640,6 +640,9 @@ func validateOpts(opts *Options, rngs []int64) (*Options, []int64) {
if opts.HeadChunksWriteQueueSize < 0 {
opts.HeadChunksWriteQueueSize = chunks.DefaultWriteQueueSize
}
if opts.SamplesPerChunk <= 0 {
opts.SamplesPerChunk = DefaultSamplesPerChunk
}
if opts.MaxBlockChunkSegmentSize <= 0 {
opts.MaxBlockChunkSegmentSize = chunks.DefaultChunkSegmentSize
}