From 8493704b9b5034908107f8471e6a7b7df3134624 Mon Sep 17 00:00:00 2001 From: arthursens Date: Fri, 25 Dec 2020 10:45:23 -0300 Subject: [PATCH] Change seconds()*1000 to milliseconds() Signed-off-by: arthursens --- tsdb/db.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tsdb/db.go b/tsdb/db.go index efd579f3a..73b87b0a5 100644 --- a/tsdb/db.go +++ b/tsdb/db.go @@ -840,8 +840,7 @@ func (db *DB) Compact() (returnErr error) { } compactionDuration := time.Since(start) - // TODO: change to milliseconds once fuzzit tests are removed - if int64(compactionDuration.Seconds())*1000 > db.head.chunkRange.Load() { + if compactionDuration.Milliseconds() > db.head.chunkRange.Load() { level.Warn(db.logger).Log( "msg", "Head compaction took longer than the block time range, compactions are falling behind and won't be able to catch up", "duration", compactionDuration.String(),