From b7bea04e62fda5eccd8f3999a6e2fb50117d46f4 Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Fri, 26 Jan 2018 19:33:59 +0530 Subject: [PATCH] Fix extra reloads. Previously we reloaded every 1 minute irrespective of whether there are deleted blocks or not. Signed-off-by: Goutham Veeramachaneni --- db.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db.go b/db.go index b659165f1..292b2a833 100644 --- a/db.go +++ b/db.go @@ -299,7 +299,11 @@ func (db *DB) retentionCutoff() (bool, error) { } // This will close the dirs and then delete the dirs. - return len(dirs) > 0, db.reload(dirs...) + if len(dirs) > 0 { + return true, db.reload(dirs...) + } + + return false, nil } // Appender opens a new appender against the database.