Skip to content

Commit

Permalink
Protect against stateful mappers returning nothing in the raw executor
Browse files Browse the repository at this point in the history
Fixes #5303.
  • Loading branch information
jsternberg committed Feb 18, 2016
1 parent 1abf062 commit 6facbc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tsdb/raw.go
Expand Up @@ -224,6 +224,11 @@ func (e *RawExecutor) execute(out chan *models.Row, closing <-chan struct{}) {
}
}

// Protect against none of the mappers producing any output.
if chunkedOutput == nil {
continue
}

if ascending {
// Sort the values by time first so we can then handle offset and limit
sort.Sort(MapperValues(chunkedOutput.Values))
Expand Down

0 comments on commit 6facbc4

Please sign in to comment.