[0.9.5-nightly] Derivative query doesn't work in a non replicated cluster
I seem to have an issue with derivative queries in a cluster.. I was trying some additional configurations with clustering and noticed this behavior - I'm not sure if it's a known issue with the query engine or a problem with my configuration..
I have an 8 host cluster, with replication factor = 1..
> show retention policies on netdata name duration replicaN default default 0 3 false short 9600h0m0s 1 true >
I can select some data...
> select value from interface_data where host = 'somehost' and interface_name = 'Vl5' and metric = 'ifHCInOctets' and time > now() - 30m name: interface_data -------------------- time value 1446749776411956019 3.73018113929393e+14 1446749836345047027 3.73023113096488e+14 1446749896425886560 3.73028366913419e+14 1446749956315303060 3.73033673296223e+14 1446750016818390388 3.73040300914575e+14 1446750087117638225 3.73046549728615e+14 1446750137023316891 3.73052610922339e+14 1446750206677066254 3.73056846274944e+14 1446750256864602420 3.73064962017879e+14 1446750338272274626 3.73079968665597e+14 1446750441277330925 3.73092761498466e+14 1446750469406026184 3.73106659942316e+14 1446750496059780303 3.73114896504457e+14 1446750567620325947 3.73120315407618e+14 1446750616526404748 3.73125999610172e+14 1446750706036906023 3.73131410939854e+14 1446750758464212416 3.73140037940864e+14 1446750812581328347 3.73143981631842e+14 1446750862720527191 3.73150508088325e+14 1446750917350981548 3.73155301302281e+14 1446750976338173959 3.73161498833741e+14 1446751046779712623 3.73166705887694e+14 1446751117401539690 3.73173875853708e+14 1446751166262117719 3.73179336686568e+14 1446751351290064961 3.73214986538692e+14 1446751385516547694 3.73226725243682e+14 1446751404338094237 3.73230055280633e+14 1446751505837514062 3.73236641554357e+14 1446751537358151248 3.73244456918137e+14
Let's say I'd like to do a derivative query on that..
> select derivative(mean(value)) from interface_data where host = 'somehost' and interface_name = 'Vl5' and metric = 'ifHCInOctets' and time > now() - 30m group by time(1m) name: interface_data -------------------- time derivative 0 0
Hmm, nothing returns, but the mean() aggregation seems to work...
> select mean(value) from interface_data where host = 'somehost' and interface_name = 'Vl5' and metric = 'ifHCInOctets' and time > now() - 30m name: interface_data -------------------- time mean 0 3.731771773751724e+14
I also have a database with a fully replicated retention policy and derivative queries seem to work...
> show retention policies on sysstats name duration replicaN default default 0 3 false short 720h0m0s 8 true
If I try the same on this database, it does seem to work.
> select derivative(mean(value)) from io_write_bytes where name = 'sda' and host='somehost' and time > now() - 30m group by time(1m) name: io_write_bytes -------------------- time derivative 1446750000000000000 3.9522986640625e+06 1446750060000000000 1.530666666796875e+07 1446750120000000000 1.191313066796875e+07 1446750180000000000 5.60469333203125e+06 1446750240000000000 7.58749866796875e+06 1446750300000000000 1.098325333203125e+07 1446750360000000000 9.37608533203125e+06 1446750420000000000 1.591466666796875e+07 1446750480000000000 1.7947648e+07 1446750540000000000 5.60631466796875e+06 1446750600000000000 6.26210133203125e+06 1446750660000000000 7.98779733203125e+06 1446750720000000000 8.1634133359375e+06 1446750780000000000 8.425216e+06 1446750840000000000 2.3736064e+07 1446750900000000000 5.9309226640625e+06 1446750960000000000 5.9257173359375e+06 1446751020000000000 5.8139306640625e+06 1446751080000000000 5.9277653359375e+06 1446751140000000000 7.430912e+06 1446751200000000000 2.4239872e+07 1446751260000000000 2.5824768e+07 1446751320000000000 1.1468288e+07 1446751380000000000 1.01229226640625e+07 1446751440000000000 6.669312e+06 1446751500000000000 6.6005333359375e+06 1446751560000000000 1.1288832e+07 1446751620000000000 1.89874346640625e+07 1446751680000000000 4.53495466796875e+06
So, I'm not sure if there's something going on with non-replicated data and derivative queries, or aggregations or what, but it seems like there's something going on.
Thanks for the report @jmcook
That's interesting that it works in a fully replicated cluster, given https://github.com/influxdb/influxdb/issues/4667
@jmcook what version of InfluxDB are you running?
Sorry, should've mentioned that. influxdb-0.9.5_nightly_827c513-1.x86_64
For kicks, here's the output of show servers...
> show servers id cluster_addr raft raft-leader 1 influx1:8088 true true 2 influx3:8088 true false 3 influx2:8088 true false 4 influx4:8088 false false 5 influx8:8088 false false 6 influx5:8088 false false 7 influx7:8088 false false 8 influx6:8088 false false
Clustering is no longer supported in the open source version so I am going to close this. Thanks.