Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
Signed-off-by: Krasi Georgiev <[email protected]>
  • Loading branch information
krasi-georgiev committed Aug 21, 2020
1 parent 79c615f commit db2eb42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/query/iter.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ func (it *dedupSeriesIterator) Next() bool {
// Advance both iterators to at least the next highest timestamp plus the potential penalty.
if it.aok {
it.aok = it.a.Seek(it.lastT + 1 + it.penA)
// When A is exhausted the seek for B below should be without any penalty
if !it.aok {
it.penB = 0
}
Expand Down Expand Up @@ -615,7 +616,7 @@ func (it *dedupSeriesIterator) Next() bool {
it.useA = ta <= tb

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

0 comments on commit db2eb42

Please sign in to comment.