Skip to content

[WIP]Check if storeapi series is nil before iterating - #19

Open
4n4nd wants to merge 1 commit into
thanos-community:masterfrom
4n4nd:nil-series-fix
Open

[WIP]Check if storeapi series is nil before iterating#19
4n4nd wants to merge 1 commit into
thanos-community:masterfrom
4n4nd:nil-series-fix

Conversation

@4n4nd

@4n4nd 4n4nd commented Oct 2, 2020

Copy link
Copy Markdown
Contributor

Addresses #18

@bwplotka bwplotka left a comment

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.

I think we need bit different behaviour but it's close (:

@@ -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

@4n4nd 4n4nd changed the title Check if storeapi series is nil before iterating [WIP]Check if storeapi series is nil before iterating Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants