-
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-nighly, cluster] some aggregate function work incorrectly in cluster mode #4816
Comments
@mengjinglei in your example, you write the points to node 1 before nodes 2 and 3 are launched. If this is a new cluster, then node 1 had no concept of nodes 2 and 3 and therefore would not write data to them when they join the new cluster. Can you confirm whether the cluster already existed? If not, this is expected behavior from the current clustering implementation. Prior points are not copied to new nodes in a cluster. |
@beckettsean though node1 won't send data to node2 and node3, query(described by @mengjinglei for example) executed on node2 and node3 will pull data from node1. Moreover, functions like |
@CrazyJvm that's a good point. The queries should be distributed to each node, and node 1 should be able to respond with the data it has. |
@mjdesa can you try to repro? This might be an 0.9.5 blocker. |
pr #4817 fix Min and max |
fix issue #4816 some aggregate function work incorrectly in cluster mode
Clustering is no longer supported in the open source version. Thank you. |
In cluster mode, when the request data is not stored locally, local node will send a rpc to fetch data from a remote node. while such a query with aggregate functions like
select max(value) from cpu where time > now() - 3h group by time(1h)
returns all points with nil fields which is not the correct case. This issue is also applicable when retention replication factor is less than the number of nodes in cluster.reproduce steps
for description convinience, we assume that we have three nodes namely node1:8086, node2:8086 and node3:8086
./influxd
curl -G http://node1:8086/query --data-urlencode "q=create database test"
curl -i -XPOST 'http://node1:8086/write?db=test' --data-binary 'cpu value=1'
curl -G 'http://node1:8086/query?db=test&pretty=true' --data-urlencode "q=select max(value) from cpu where time > now() - 3h group by time(1h)"
response is:
./influxd -join http://node1:8088
./influxd -join http://node1:8088 http://node2:8088
curl -G 'http://node2:8086/query?db=test&pretty=true' --data-urlencode "q=select max(value) from cpu where time > now() - 3h group by time(1h)"
response is:
after apply pr #4815, the response is:
we can see that, point
cpu value=1
is stored in node1, when query node1, we can get the correct data, while query node2 with the same sql, the fields of values in result are all nil.but query with
mean
aggregate function returns the correct result:after investigation, I found that four functions
bottom,min,max,top
function work incorrectly.The text was updated successfully, but these errors were encountered: