Skip to content
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

data files and series exist after drop database #3049

Closed
jasper-zhang opened this issue Jun 19, 2015 · 12 comments
Closed

data files and series exist after drop database #3049

jasper-zhang opened this issue Jun 19, 2015 · 12 comments
Assignees
Milestone

Comments

@jasper-zhang
Copy link

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 !!

@jasper-zhang
Copy link
Author

The result of "SHOW MEASUREMENTS" exists also.

@maxcanada
Copy link

Same issue here

@otoolep
Copy link
Contributor

otoolep commented Jun 19, 2015

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 #3009 -- when this issue is closed, DROP MEASUREMENT will work on a cluster.

@otoolep otoolep self-assigned this Jun 19, 2015
@maxcanada
Copy link

Actually we have this issue on a single node
Thanks

@otoolep
Copy link
Contributor

otoolep commented Jun 19, 2015

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

@maxcanada
Copy link

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,

@otoolep
Copy link
Contributor

otoolep commented Jun 22, 2015

@maxcanada -- the JSON in your supplied "write" is not valid. retentionPolicy needs to be quoted.

@otoolep
Copy link
Contributor

otoolep commented Jun 22, 2015

Fixed by #3090

@otoolep
Copy link
Contributor

otoolep commented Jun 22, 2015

Thanks @maxcanada for the bug report.

@jasper-zhang
Copy link
Author

@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"
}

@beckettsean
Copy link
Contributor

@jasper-zhang you must double-quote measurement names that contain a period.

@otoolep
Copy link
Contributor

otoolep commented Jun 23, 2015

The original issue has been addressed and 0.9.1 will have the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants