mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-13 18:40:16 -04:00
Don't delete files if retention duration is 0
This commit is contained in:
parent
9c76624df2
commit
987a90d149
1 changed files with 3 additions and 0 deletions
3
db.go
3
db.go
|
|
@ -292,6 +292,9 @@ func (db *DB) compact(i, j int) error {
|
|||
}
|
||||
|
||||
func (db *DB) retentionCutoff() error {
|
||||
if db.opts.RetentionDuration == 0 {
|
||||
return nil
|
||||
}
|
||||
h := db.heads[len(db.heads)-1]
|
||||
t := h.meta.MinTime - int64(db.opts.RetentionDuration)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue