Skip to content

Commit db2eb42

Browse files
more comments
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
1 parent 79c615f commit db2eb42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/query/iter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ func (it *dedupSeriesIterator) Next() bool {
582582
// Advance both iterators to at least the next highest timestamp plus the potential penalty.
583583
if it.aok {
584584
it.aok = it.a.Seek(it.lastT + 1 + it.penA)
585+
// When A is exhausted the seek for B below should be without any penalty
585586
if !it.aok {
586587
it.penB = 0
587588
}
@@ -615,7 +616,7 @@ func (it *dedupSeriesIterator) Next() bool {
615616
it.useA = ta <= tb
616617

617618
// For the series we didn't pick, add a penalty aligned to the resolution step.
618-
// This ensures that we don't miss a sample for the requested step when switching iterators and
619+
// This ensures that we don't miss a sample for the requested resolution when switching iterators and
619620
// also not pick too many samples for the current resolution.
620621
// Promql has a default look back delta of 5min so if the penalty causes the duration
621622
// between 2 samples to be greater then the default look back it causes data gaps.

0 commit comments

Comments
 (0)