mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
tsdb: improve blockBaseSeriesSet scan
Inverting the test for chunks deleted by tombstones makes all three rejections consistent, and also avoids the case where a chunk is excluded but still causes `trimFront` or `trimBack` to be set. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
30b31cae93
commit
1226922ff5
|
@ -481,10 +481,10 @@ func (b *blockBaseSeriesSet) Next() bool {
|
|||
if chk.MinTime > b.maxt {
|
||||
continue
|
||||
}
|
||||
|
||||
if !(tombstones.Interval{Mint: chk.MinTime, Maxt: chk.MaxTime}.IsSubrange(intervals)) {
|
||||
chks = append(chks, chk)
|
||||
if (tombstones.Interval{Mint: chk.MinTime, Maxt: chk.MaxTime}.IsSubrange(intervals)) {
|
||||
continue
|
||||
}
|
||||
chks = append(chks, chk)
|
||||
|
||||
// If still not entirely deleted, check if trim is needed based on requested time range.
|
||||
if !b.disableTrimming {
|
||||
|
|
Loading…
Reference in a new issue