Skip to content

Commit

Permalink
PR remarks and TODO to handle edge case
Browse files Browse the repository at this point in the history
Signed-off-by: Kaviraj <[email protected]>
  • Loading branch information
kavirajk committed Feb 19, 2024
1 parent 655844f commit ef9afeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ cmd/querytee/querytee
dlv
rootfs/
dist
coverage.txt
test_results.txt
*coverage.txt
*test_results.txt
.DS_Store
.aws-sam
.idea
Expand Down
6 changes: 4 additions & 2 deletions pkg/logql/rangemapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ func (m RangeMapper) rangeSplitAlign(
}

var (
newRng = align
newRng = align

// TODO(kavi): If the originalOffset is non-zero, there may be a edge case, where subqueries generated won't be aligned correctly. Handle this edge case in separate PR.
newOffset = originalOffset
downstreams *ConcatSampleExpr
pendingRangeInterval = rangeInterval
Expand All @@ -389,7 +391,7 @@ func (m RangeMapper) rangeSplitAlign(
splits++

newOffset += align // e.g: offset 34m
pendingRangeInterval -= align
pendingRangeInterval -= newRng
newRng = m.splitByInterval // [1h]

// Rest of the subqueries.
Expand Down

0 comments on commit ef9afeb

Please sign in to comment.