mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -08:00
Update tsdb/compact.go
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
This commit is contained in:
parent
a7737ab3ac
commit
27d0e12f32
|
@ -233,7 +233,14 @@ func (c *LeveledCompactor) Plan(dir string) ([]string, error) {
|
|||
|
||||
func (c *LeveledCompactor) plan(dms []dirMeta) ([]string, error) {
|
||||
slices.SortFunc(dms, func(a, b dirMeta) int {
|
||||
return int(a.meta.MinTime - b.meta.MinTime)
|
||||
switch {
|
||||
case a.meta.MinTime < b.meta.MinTime:
|
||||
return -1
|
||||
case a.meta.MinTime > b.meta.MinTime:
|
||||
return 1
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
})
|
||||
|
||||
res := c.selectOverlappingDirs(dms)
|
||||
|
|
Loading…
Reference in a new issue