Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/series/storeapi/storeapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ func (i *iterator) Next() bool {
}

i.currentSeries = seriesResp.GetSeries()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, nil is actually ok because we have different responses: warnings hints as well..

We should gather warnings at least and log them and otherwise ignore non series frames (:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

umm what do you suggest how do we prevent Seg faults then?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in 99% cases you can always check how we deal with this on Thanos (:

https://github.com/thanos-io/thanos/blob/49dad93ed67210374939aedd7a8f849a60375906/pkg/query/querier.go#L153

if i.currentSeries == nil {
i.err = errors.Errorf("Received nil series from Series Response")
return false
}
return true
}

Expand Down