-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[0.9.5-nightly] GROUP BY time() not handled correctly from mean() query on distributed cluster data (with nasty side effects) #4331
Comments
Not sure I quite follow this. I can see from your examples that without the
This is an error we see when there are Can you paste in the results of |
So while troubleshooting I noticed that the time field returns 0 on the node without the shards but does return a time on the node with the shards. As I'd expect the query to return the same regardless of shard location I assumed that was root cause and stopped. As for the exact semantics of what that field should be, I'm going to admit I'm a but out of my depth as I'm troubleshooting a query built by Grafana, I'm still coming up to speed on InfluxDB query language. So if that part of the bug report is wrong or misleading I apologize, I tried to describe it as well as I could. I'll be happy to edit it. As for my dataset containing NaNs, it shouldn't. This dataset is being fed from a test data generator which is returning floats 0<= f <= 100. The configuration works if InfluxDB is not clustered, I have not seen any errors like this with a single InfluxDB server, it crops up when I try and cluster InfluxDB. Assuming this query is correct the answer is no:
|
I've reproduced this in a Docker Compose environment. See the following repo with details on how to reproduce: https://github.com/CVTJNII/Influx_4331_proof |
Thanks for the detailed information @CVTJNII -- I will try to take a look at this. |
+1, seeing the same behavior with |
+1 on |
I'm going to close this since clustering is no longer supported in the open source version. Thank you. |
In troubleshooting the following Grafana generated query:
I have found that, on sharded data, the time field returned from mean isn't handled correctly if the data is not on the host running the query.
I'm currently testing in a 5 node cluster, version 0.9.5-nightly-b079d20, branch master, commit b079d20, built '2015-09-28T04:00:39+0000', with the following replication policy:
This is causing the data to shard across 4/5 of the servers. Sharding is visible with 'show series' (likely part of the bug or a side effect, as I'd expect 'show series' to show all series):
On node 1:
On node 3:
The problem I'm seeing is that, on node 1, the select mean query does not handle time correctly which breaks the group by clause:
On node 1:
On node 3 it works (limit clause added to truncate output):
On node 1 this also breaks the JSON response in the API:
This has the effect of breaking my Grafana dashboards on sharded data as Grafana combines queries across all shards into a single request. As such the response for the combined query is the MarshalJSON error from above and none of the dashboards work.
The text was updated successfully, but these errors were encountered: