Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Fix extra reloads.
Browse files Browse the repository at this point in the history
Previously we reloaded every 1 minute irrespective of whether there are
deleted blocks or not.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
  • Loading branch information
gouthamve committed Jan 26, 2018
1 parent ad0fdaf commit b7bea04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b7bea04

Please sign in to comment.