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

InfluxDB crashes with text field selected in inner join #740

Closed
cboggs opened this issue Jul 14, 2014 · 0 comments
Closed

InfluxDB crashes with text field selected in inner join #740

cboggs opened this issue Jul 14, 2014 · 0 comments
Milestone

Comments

@cboggs
Copy link

cboggs commented Jul 14, 2014

InfluxDB crashes when specifying a text field as a selection either before or after selecting the difference between two fields in an INNER JOIN

When using an INNER JOIN, selecting various component fields works as expected. Likewise, selecting the difference between two fields (eg: select a.value - b.value...) works as expected. Specifying a text field, such as hostname, before or after that type of subtraction value causes InfluxDB to crash.

Crashing queries were submitted via both the web admin UI and curl. Sample included below.

Example queries:
WORKS

SELECT total.value, total.hostname, idle.value, idle.hostname FROM totalThreads AS total INNER JOIN idleThreads AS idle GROUP BY time(15s);

WORKS

SELECT total.value - idle.value FROM totalThreads AS total INNER JOIN idleThreads AS idle GROUP BY time(15s);

CRASHES

SELECT total.value - idle.value, total.hostname FROM totalThreads AS total INNER JOIN idleThreads AS idle GROUP BY time(15s);

CRASHES

SELECT total.hostname, total.value - idle.value FROM totalThreads AS total INNER JOIN idleThreads AS idle GROUP BY time(15s);

CRASHES

curl 'http://influxdb:8086/db/testdb/series?u=root&p=root&q=SELECT%20total.value%20-%20idle.value%2C%20total.hostname%20FROM%20totalThreads%20AS%20total%20INNER%20JOIN%20idleThreads%20AS%20idle%20GROUP%20BY%20time(15s)%3B' -H 'Accept: application/json, text/javascript'

Quick cURL to generate test data:

curl -v -XPOST -d '[ { "name" : "totalThreads", "columns" : ["time", "value", "hostname"], "points" : [ [1405364100, 16, "serverA"], [1405364105, 20, "serverB"], [1405364115, 16, "serverA"], [1405364120, 20, "serverB"], [1405364130, 18, "serverA"], [1405364135, 15, "serverB"], [1405364145, 19, "serverA"], [1405364150, 16, "serverB"] ] }, { "name" : "totalThreads", "columns" : ["time", "value", "hostname"], "points" : [ [1405364100, 12, "serverA"], [1405364105, 9, "serverB"], [1405364115, 13, "serverA"], [1405364120, 12, "serverB"], [1405364130, 8, "serverA"], [1405364135, 13, "serverB"], [1405364145, 2, "serverA"], [1405364150, 13, "serverB"] ]} ]' 'http://influxdb:8086/db/testdb/series?u=testuser&p=testpw&time_precision=s'

Debug log info from test is available if needed, but it simply cuts off after logging what the requested query string is, no indication of error or warning before the process dies.

(To be clear, I did eventually figure out that the way to get what I wanted was to craft something like this:
select difference(value) from totalThreads merge idleThreads group by time(15s), hostname;

Just wanted to point out that doing it incorrectly causes a crash instead of an error message.)

@cboggs cboggs changed the title InfluxDB crashes when specifying a text field as a selection either before InfluxDB crashes with text field select in inner join Jul 27, 2014
@cboggs cboggs changed the title InfluxDB crashes with text field select in inner join InfluxDB crashes with text field selected in inner join Jul 27, 2014
@jvshahid jvshahid added this to the 0.8.0 milestone Jul 28, 2014
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

No branches or pull requests

2 participants