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

Allow NewQueryEngine to return an error #319

Merged
merged 1 commit into from
Mar 10, 2014

Conversation

zorkian
Copy link
Contributor

@zorkian zorkian commented Mar 9, 2014

Some errors only appear pretty deep. A "SELECT COUNT(*)" was ending up as a panic, when instead it should have been returned as a query error to the user. This adds plumbing for returning an error from NewQueryEngine.

Reproduction: execute a "SELECT COUNT(*) FROM proc.stat.cpu" and, pre-patch, you get a panic in your terminal and nothing in your browser. With this patch, you get "ERROR: function count() doesn't work with wildcards".

This also adds early-exit logic to yieldSeriesData where errors were being collected but not processed. I don't know if this is correct. All of my manual tests pass, and the non-coordinator tests seem to pass.

Some errors only bubble up from pretty deep. A "SELECT COUNT(*)" was
ending up as a panic, when instead it should have been returned as a
query error to the user.

This adds plumbing for returning an error from NewQueryEngine.
@zorkian
Copy link
Contributor Author

zorkian commented Mar 9, 2014

Also, I only tested this in local shard mode, so this is untested in a cluster setup.

@jvshahid jvshahid added this to the 0.5.0 milestone Mar 10, 2014
@jvshahid jvshahid merged commit 386d3d6 into influxdata:master Mar 10, 2014
@jvshahid
Copy link
Contributor

Thanks @zorkian for your contribution. It'd be appreciated to include tests with your pr to make it easier for us to validate the patch and make sure we don't have regressions in the future. I went ahead and added a test and merged your changes. I think some code changed on master that broke the propagation of the error, so i had to make these changes to fix the test case 7b74e5d

Cheers,

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.

None yet

2 participants