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 can re-appear after it's been deleted #14229

Closed
e-dard opened this issue Jun 28, 2019 · 1 comment
Closed

Data can re-appear after it's been deleted #14229

e-dard opened this issue Jun 28, 2019 · 1 comment
Assignees
Milestone

Comments

@e-dard
Copy link
Contributor

e-dard commented Jun 28, 2019

Whilst investigating #10052 I triggered another bug, which I initially thought was the source of #10052, but in the end isn't. The bug manifests itself as follows:

  • You start up the sever with some data in the WAL.
  • The data is added to the cache on startup.
  • The cache snapshots the data to a TSM file (the cache is empty).
  • You delete the data, e.g., via DROP SERIES or DROP MEASUREMENT.
  • The data is deleted from the TSM files via tombstone markers.
  • You restart the server - the data is back again.

You can reproduce via:

- startup influxdb

> insert cpu c=12
> select * from cpu
name: cpu
time                        c
----                        - 
2019-06-28T12:04:11.671819Z 12

- Shut down server
- Start it up, but with a much lower snapshot time so you don't need to wait..

$ INFLUXDB_DATA_CACHE_SNAPSHOT_WRITE_COLD_DURATION=10s  influxd

- *important*, wait for the cache to snapshot to a TSM file.

> drop measurement cpu
> select * from cpu
>

- restart server

> select * from cpu
name: cpu
time                        c
----                        - 
2019-06-28T12:04:11.671819Z 12

This affects all versions back to at least 1.5.3. I didn't test on earlier versions.

@e-dard
Copy link
Contributor Author

e-dard commented Jul 8, 2019

Fixed via #14232

@e-dard e-dard closed this as completed Jul 8, 2019
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

1 participant