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

rc33 when drop the database, we found the database has not actually been dropped. #2916

Closed
ziyel opened this issue Jun 11, 2015 · 1 comment
Labels
Milestone

Comments

@ziyel
Copy link

ziyel commented Jun 11, 2015

scenario 1:

I have run below lines in the influx cli.

> drop database justtest
> create database justtest
> use justtest
Using database justtest
> show measurements
name: measurements
------------------
name
test.test.test.test2

I can show the measurements after recreating the database justtest.

scenario 2:

1 Insert a point with line protocol.

test.test.test.test2,host=host value="20",value2="20" 1434009080000000000

2 Select the results in influx cil.

> select * from "test.test.test.test2"
name: test.test.test.test2
tags: host=host
time            value   value2
----            -----   ------
2015-06-11T07:51:20Z    20  20

3 Drop and create the database with the same name.

> drop database justtest
> create database justtest

4 Insert a point without value2 field.

test.test.test.test2,host=host value="20" 1434009080000000000

5 Select again.

> select * from "test.test.test.test2"
name: test.test.test.test2
tags: host=host
time            value   value2
----            -----   ------
2015-06-11T07:51:20Z    20

We can still see the value2 field.

Any ideas about this?
Thanks in advance.

@beckettsean
Copy link
Contributor

Looks like the points are gone but the database metadata persists:

> drop database mydb
> create database mydb
> use mydb
Using database mydb
> show measurements
name: measurements
------------------
name
triangle
triangle-float

> select * from triangle
> select value from triangle
> show series
name: triangle
--------------
_key            tagkey
triangle,tagkey=tagval  tagval


name: triangle-float
--------------------
_key                tagkey2
triangle-float,tagkey2=tagval1  tagval1

Bouncing the database between the drop and create database statements appears to alleviate the issue, pointing I think convincingly at the metadata store being the culprit.

> drop database mydb
> show databases
ERR: Get http://localhost:8086/query?db=&q=show+databases: dial tcp 127.0.0.1:8086: connection refused
> show databases
name: databases
---------------
name

> create database mydb
> use mydb
Using database mydb
> show series
> select value from triangle
ERR: measurement not found: "mydb"..triangle

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

No branches or pull requests

3 participants