From 30e777d10d8d974ac561de4f9f17a514e1cdc4f9 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Mon, 30 Oct 2017 12:09:56 +0100 Subject: [PATCH] tsdb: default too small max block duration --- storage/tsdb/tsdb.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/tsdb/tsdb.go b/storage/tsdb/tsdb.go index 72527c540..f07776544 100644 --- a/storage/tsdb/tsdb.go +++ b/storage/tsdb/tsdb.go @@ -127,8 +127,7 @@ type Options struct { // Open returns a new storage backed by a TSDB database that is configured for Prometheus. func Open(path string, l log.Logger, r prometheus.Registerer, opts *Options) (*tsdb.DB, error) { if opts.MinBlockDuration > opts.MaxBlockDuration { - return nil, errors.Errorf("tsdb max block duration (%v) must be larger than min block duration (%v)", - opts.MaxBlockDuration, opts.MinBlockDuration) + opts.MaxBlockDuration = opts.MinBlockDuration } // Start with smallest block duration and create exponential buckets until the exceed the // configured maximum block duration.