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

[0.9.1] Drop database deletes data/ directory #3330

Closed
PierreF opened this issue Jul 15, 2015 · 5 comments
Closed

[0.9.1] Drop database deletes data/ directory #3330

PierreF opened this issue Jul 15, 2015 · 5 comments
Assignees
Milestone

Comments

@PierreF
Copy link
Contributor

PierreF commented Jul 15, 2015

On master (56d3add), when I issue a "DROP DATABASE name", the folder ~/.influxdb/data is removed, meaning all data files are removed. So after a restart (because influxdb keep some file opened) I've lost all data from all databases.

Version 0.9.1 is also affected.

Step to reproduce:

  • clean ~/.influxdb to start from fresh setup (rm -fr ~/.influxdb)
  • Start influxdb
  • With UI, issue CREATE DATABASE db1 and CREATE DATABASE db2
  • With UI, write into both database (I'm writting cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000, from the doc)
  • Check with SHOW MEASUREMENTS that writes succeed.
  • Also check that two folder "db1" and "db2" exists under ~/.influxdb/data
  • With UI Issue DROP DATABASE db1
  • Folder ~/.influxdb/data no longer exists ! (so db2's file are deleted from disk)
  • Restart influxdb, db2 still exists but is empty (SHOW MEASUREMENTS return nothing)
@beckettsean beckettsean changed the title Drop database delete files from ALL databases [0.9.1] Drop database deletes data/ directory Jul 15, 2015
@desa
Copy link
Contributor

desa commented Jul 15, 2015

@pauldix @otoolep any ideas?

@otoolep
Copy link
Contributor

otoolep commented Jul 15, 2015

One for @dgnorton, @jwilder and @benbjohnson too.

@otoolep
Copy link
Contributor

otoolep commented Jul 15, 2015

Fixed by #3335

otoolep added a commit that referenced this issue Jul 15, 2015
@desa desa closed this as completed Jul 15, 2015
@otoolep
Copy link
Contributor

otoolep commented Jul 15, 2015

@mjdesa -- we don't usually close issues until a PR is merged.

@otoolep
Copy link
Contributor

otoolep commented Jul 15, 2015

Merged to master.

Thanks for the reports @mjdesa and @PierreF

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

No branches or pull requests

4 participants