data files and series exist after drop database
My version is 0.9.0, and I created a cluster of 3 servers. After I create a db and insert some data to it, I drop the db. I find the db files in the server which I curl the drop command are deleted, but data files in other two servers exist still. Otherwise, I find the result of "show series" is still seen !!
The result of "SHOW MEASUREMENTS" exists also.
Same issue here
Since clustering is in alpha-state, not all operations are support on clusters. DROP MEASUREMENT is one such operation. It only works correctly on a single node.
Please follow https://github.com/influxdb/influxdb/issues/3009 -- when this issue is closed, DROP MEASUREMENT will work on a cluster.
Actually we have this issue on a single node Thanks
Can you please show me an entire sequence of curl commands demonstrating the issue on your single node, as described here?
https://github.com/influxdb/influxdb/blob/master/CONTRIBUTING.md#bug-reports
Hi,
Here is the list of commands I've done :
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" Result : {"results":[{}]}
curl -G http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY myrp ON mydb DURATION 365d REPLICATION 1 DEFAULT" Result : {"results":[{}]}
curl -d '{"database" : "mydb, retentionPolicy" : "myrp", "points": [{"measurement":"cpu","tags":{"region":"useast","host":"server_1","service":"redis"},"fields":{"value":61}}]}' -H "Content-Type: application/json" http://localhost:8086/write
curl -G http://localhost:8086/query --data-urlencode "q=DROP DATABASE mydb"
curl -G http://localhost:8086/query --data-urlencode 'db=mydb' --data-urlencode 'q=SELECT * from cpu' {"results":[{"error":"database not found: mydb"}]}
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb" curl -G http://localhost:8086/query --data-urlencode "q=CREATE RETENTION POLICY myrp ON mydb DURATION 365d REPLICATION 1 DEFAULT" Result : {"results":[{}]}
Here is the problem :
curl -G http://localhost:8086/query --data-urlencode 'db=mydb' --data-urlencode 'q=SHOW MEASUREMENTS' {"results":[{"series":[{"name":"measurements","columns":["name"],"values":[["cpu"]]}]}]}
No data in there though : curl -G http://localhost:8086/query --data-urlencode 'db=mydb' --data-urlencode 'q=SELECT * from cpu' {"results":[{}]}
Thanks a lot,
@maxcanada -- the JSON in your supplied "write" is not valid. retentionPolicy needs to be quoted.
Fixed by https://github.com/influxdb/influxdb/pull/3090
Thanks @maxcanada for the bug report.
@otoolep --DROP MEASUREMENT will not work when my MEASUREMENT contains dot, result show: { "error": "error parsing query: found ., expected SELECT, DELETE, SHOW, CREATE, DROP, GRANT, REVOKE, ALTER, SET at line 1, char 21" }
@jasper-zhang you must double-quote measurement names that contain a period.
The original issue has been addressed and 0.9.1 will have the fix.