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

Fixes #5664 #5697

Closed
wants to merge 1 commit into from
Closed

Fixes #5664 #5697

wants to merge 1 commit into from

Conversation

e-dard
Copy link
Contributor

@e-dard e-dard commented Feb 16, 2016

This fixes the panic in #5664.

@jwilder
Copy link
Contributor

jwilder commented Feb 16, 2016

👍

@jonseymour
Copy link
Contributor

@e-dard See the test case in #5712. I have actually encountered this in a live system. I was getting a panic prior to apply a version of #5697. After I applied #5697 the system went into an infinite loop.

Reading the code, I discovered newFieldsFromBinary doesn't handle the empty field name case.

I am going to dig into why my system is trying to use a field with an empty field name.

@jonseymour
Copy link
Contributor

Ok, I found the problem that is resulting in an empty field name which is then generating the panic &/or loop.

If I run this query:

select count(value) into "summary" from "foobar" where time > now() - 1h group by time(5m)

everything works as expected - a new series is created which has a "count" field.

However, if I do this:

select count(value)/60 into "summary" from "foobar" where time > now() - 1h group by time(5m)

then I trigger either the panic or the infinite loop depending on which version of the code I have installed.

In other words, the empty field name results from using math in the select clause of a SELECT INTO statement.

jonseymour added a commit to jonseymour/influxdb that referenced this pull request Feb 17, 2016
Prior to influxdata#5697 it causes a panic, after influxdata#5697 it causes an infinite loop

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
@jonseymour
Copy link
Contributor

Ok, I combined the test in #5712 with a fix for the problem demonstrated by that test into #5716 and have withdrawn #5712.

There is a related PR #5714 which fixes a problem that causes binary points to be created with empty field names.

Both PRs currently merge cleanly with 0.10.0. #5714 will need a merge conflict to be resolved before it is ready for master.

@jonseymour
Copy link
Contributor

This PR could be closed provided #5716 is accepted, since #5716 also includes this change. See 88937ab

jonseymour added a commit to jonseymour/influxdb that referenced this pull request Feb 17, 2016
Previously, influx would either panic (influxdata#5664) or enter a loop (post-influxdata#5697) in
the case that a binary point contained an empty field name.

Now we tolerate the case by skipping the empty field.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
jonseymour added a commit to jonseymour/influxdb that referenced this pull request Feb 20, 2016
Note that this series also includes cherry-pick of influxdata#5697.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
@e-dard
Copy link
Contributor Author

e-dard commented Feb 23, 2016

Closed in favour of #5716

@e-dard e-dard closed this Feb 23, 2016
@e-dard e-dard deleted the er-fix-scan-panic branch March 9, 2016 22:16
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