Skip to content

Commit

Permalink
make min time a constant
Browse files Browse the repository at this point in the history
Signed-off-by: Ed Welch <edward.welch@grafana.com>
  • Loading branch information
slim-bean committed Apr 23, 2020
1 parent 404129b commit 3a2eaba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/logql/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var (
Help: "LogQL query timings",
Buckets: prometheus.DefBuckets,
}, []string{"query_type"})
lastEntryMinTime = time.Unix(-100, 0)
)

// ValueTypeStreams promql.ValueType for log streams
Expand Down Expand Up @@ -304,7 +305,7 @@ func readStreams(i iter.EntryIterator, size uint32, dir logproto.Direction, inte
respSize := uint32(0)
// lastEntry should be a really old time so that the first comparison is always true, we use a negative
// value here because many unit tests start at time.Unix(0,0)
lastEntry := time.Unix(-100, 0)
lastEntry := lastEntryMinTime
for respSize < size && i.Next() {
labels, entry := i.Labels(), i.Entry()
forwardShouldOutput := dir == logproto.FORWARD &&
Expand Down

0 comments on commit 3a2eaba

Please sign in to comment.