You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When repeating this in a one-node cluster, I don't see these lease conflict issues.
When running a 3-node fully replicated (default settings) cluster, I get conflict responses in the logs of
the node where the CREATE CONTINUOUS QUERY was run, since another node (n2) has acquired the lease on the continuous query, and is running them.
// n1
> create database cqtest
> use cqtest
Using database cqtest
> insert cpu value=1
> CREATE CONTINUOUS QUERY cqmin ON cqtest BEGIN SELECT min(value) INTO cqtest."default".foo FROM cqtest."default".cpu GROUP BY time(10s) END
According to the logs, at this point n2 actually gets the lease for this CQ, and runs it every 10 seconds. However, in the mean time n1 is trying to get the lease, and apparently either succeeding (200 response), or getting a conflict (409 response).
I never see node n1 actually run the CQ according to the logs. n1 logs:
[run] 2016/02/08 15:11:29 Listening for signals
2016/02/08 15:11:29 updated node metaservers with: [localhost:8191 localhost:8291 localhost:8391]
[cluster] 2016/02/08 15:11:49 accept remote connection from [::1]:51314
[tsm1wal] 2016/02/08 15:11:49 tsm1 WAL starting with 10485760 segment size
[tsm1wal] 2016/02/08 15:11:49 tsm1 WAL writing to /Users/edd/Development/influx_cluster/n2/.influxdb/wal/_internal/monitor/1
[cluster] 2016/02/08 15:11:49 accept remote connection from [::1]:51316
[continuous_querier] 2016/02/08 15:12:00 executing continuous query cqmin (2016-02-08 15:11:50 +0000 GMT to 2016-02-08 15:12:00 +0000 GMT)
[query] 2016/02/08 15:12:00 SELECT min(value) INTO cqtest."default".foo FROM cqtest."default".cpu WHERE time >= '2016-02-08T15:11:50Z' AND time < '2016-02-08T15:12:00Z' GROUP BY time(10s)
[continuous_querier] 2016/02/08 15:12:10 executing continuous query cqmin (2016-02-08 15:12:00 +0000 GMT to 2016-02-08 15:12:10 +0000 GMT)
[query] 2016/02/08 15:12:10 SELECT min(value) INTO cqtest."default".foo FROM cqtest."default".cpu WHERE time >= '2016-02-08T15:12:00Z' AND time < '2016-02-08T15:12:10Z' GROUP BY time(10s)
[continuous_querier] 2016/02/08 15:12:20 executing continuous query cqmin (2016-02-08 15:12:10 +0000 GMT to 2016-02-08 15:12:20 +0000 GMT)
[query] 2016/02/08 15:12:20 SELECT min(value) INTO cqtest."default".foo FROM cqtest."default".cpu WHERE time >= '2016-02-08T15:12:10Z' AND time < '2016-02-08T15:12:20Z' GROUP BY time(10s)
[continuous_querier] 2016/02/08 15:12:30 executing continuous query cqmin (2016-02-08 15:12:20 +0000 GMT to 2016-02-08 15:12:30 +0000 GMT)
[query] 2016/02/08 15:12:30 SELECT min(value) INTO cqtest."default".foo FROM cqtest."default".cpu WHERE time >= '2016-02-08T15:12:20Z' AND time < '2016-02-08T15:12:30Z' GROUP BY time(10s)
When repeating this in a one-node cluster, I don't see these lease conflict issues.
When running a 3-node fully replicated (default settings) cluster, I get conflict responses in the logs of
the node where the
CREATE CONTINUOUS QUERY
was run, since another node (n2
) has acquired the lease on the continuous query, and is running them.According to the logs, at this point
n2
actually gets the lease for this CQ, and runs it every 10 seconds. However, in the mean timen1
is trying to get the lease, and apparently either succeeding (200
response), or getting a conflict (409
response).I never see node
n1
actually run the CQ according to the logs.n1
logs:n2
logs:Full logs attached.
n1.txt
n2.txt
n3.txt
The text was updated successfully, but these errors were encountered: