Skip to content

Commit

Permalink
fixup! Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
  • Loading branch information
chaudum committed Jun 4, 2024
1 parent 9e3c4bc commit 6540c5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/storage/stores/composite_store_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func filterForTimeRange(refs []*logproto.ChunkRef, from, through model.Time) []c
for _, ref := range refs {
// Only include chunks where the query start time (from) is < the chunk end time (ref.Through)
// and the query end time (through) is >= the chunk start time (ref.From)
// A special case also exists where a chunk can contain a single log line which results in ref.From being equal to ref.Through, but only include this chunk if this log line timestamp is in the timerange of the query
if (through >= ref.From && from < ref.Through) || (ref.From == ref.Through && (ref.From >= from && ref.From < through) {
// A special case also exists where a chunk can contain a single log line which results in ref.From being equal to ref.Through, and that is equal to the from time.
if (through >= ref.From && from < ref.Through) || (ref.From == from && ref.Through == from) {
filtered = append(filtered, chunk.Chunk{
ChunkRef: *ref,
})
Expand Down

0 comments on commit 6540c5c

Please sign in to comment.