mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Fix extra reloads.
Previously we reloaded every 1 minute irrespective of whether there are deleted blocks or not. Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
This commit is contained in:
parent
ad0fdaf436
commit
b7bea04e62
6
db.go
6
db.go
|
@ -299,7 +299,11 @@ func (db *DB) retentionCutoff() (bool, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will close the dirs and then delete the dirs.
|
// 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.
|
// Appender opens a new appender against the database.
|
||||||
|
|
Loading…
Reference in a new issue