Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support chunked queries in the Go InfluxDB client #6166

Merged
merged 2 commits into from
Mar 31, 2016

Conversation

jsternberg
Copy link
Contributor

Modify the CLI to always use chunked queries.

@jsternberg jsternberg force-pushed the js-influxdb-client-chunked-output branch 2 times, most recently from f0a3c82 to 01fa852 Compare March 31, 2016 02:21
r, err := cr.NextResponse()
if err != nil {
// Ignore EOF errors if we got an invalid status code.
if err == io.EOF && resp.StatusCode != http.StatusOK {
Copy link
Contributor

Choose a reason for hiding this comment

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

NextResponse can't return io.EOF so I don't think you need to check for it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that got in there because an earlier version I worked on did have it return EOF. The reason for keeping it there was because EOF can be returned if the server sends a 500. It doesn't appear like it matters where in the code this check is, so I'm going to leave it in the chunked response and remove it from here.

Good catch.

@jsternberg jsternberg force-pushed the js-influxdb-client-chunked-output branch from 01fa852 to 2ec6e8b Compare March 31, 2016 15:23
If the http.CloseNotifier didn't go off for some reason (and it's not
guaranteed to go off just because the HTTP connection is closed), the
query wouldn't get correctly recycled when chunked output was requested.

The query id in the query executor was also not being set correctly.
This seems to have been an oversight when merging the point limit
monitor.
Modify the CLI to always use chunked queries.
@jsternberg jsternberg force-pushed the js-influxdb-client-chunked-output branch from 2ec6e8b to 8752d1b Compare March 31, 2016 19:30
@jwilder
Copy link
Contributor

jwilder commented Mar 31, 2016

LGTM 👍

@jsternberg jsternberg merged commit c7758c5 into master Mar 31, 2016
@jsternberg jsternberg deleted the js-influxdb-client-chunked-output branch March 31, 2016 21:06
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.

3 participants