mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Revert interval overlap comparison changes
This commit is contained in:
parent
2841499212
commit
3910b913bd
6
db.go
6
db.go
|
@ -569,17 +569,17 @@ func (db *DB) appendable() []*headBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
func intervalOverlap(amin, amax, bmin, bmax int64) bool {
|
func intervalOverlap(amin, amax, bmin, bmax int64) bool {
|
||||||
if bmin >= amin && bmin < amax {
|
if bmin >= amin && bmin <= amax {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if amin >= bmin && amin < bmax {
|
if amin >= bmin && amin <= bmax {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func intervalContains(min, max, t int64) bool {
|
func intervalContains(min, max, t int64) bool {
|
||||||
return t >= min && t < max
|
return t >= min && t <= max
|
||||||
}
|
}
|
||||||
|
|
||||||
// blocksForInterval returns all blocks within the partition that may contain
|
// blocksForInterval returns all blocks within the partition that may contain
|
||||||
|
|
Loading…
Reference in a new issue