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.10.0] DROP RETENTION POLICY does not clean up data. #5653

Closed
e-dard opened this issue Feb 12, 2016 · 5 comments
Closed

[0.10.0] DROP RETENTION POLICY does not clean up data. #5653

e-dard opened this issue Feb 12, 2016 · 5 comments
Assignees
Milestone

Comments

@e-dard
Copy link
Contributor

e-dard commented Feb 12, 2016

It's not implemented on the tsdb.Store, so data is not cleaned up after the retention policy is removed.

@zstyblik
Copy link

I wonder, once fixed, is it going to cleanup/free the data from RPs that have been dropped in the past/before fix?

@e-dard
Copy link
Contributor Author

e-dard commented Feb 16, 2016

@zstyblik unfortunately not.

@zstyblik
Copy link

@e-dard :-\ Is there any trick how to achieve that? How about backup and restore? Could it do the trick?

@e-dard
Copy link
Contributor Author

e-dard commented Feb 17, 2016

@zstyblik doing "cleanup" automatically can be problematic, and lead to the loss of data if there are bugs etc. My suggestion would be to manually check for any retention policy you don't want and remove the data that way.

Retention policies are stored as follows:

├── _internal
│   └── monitor
│       ├── 3
│       │   └── 000000002-000000002.tsm
│       └── 7
│           ├── 000000004-000000003.tsm
│           └── 000000006-000000002.tsm
├── db0
│   ├── default
│   │   └── 8
│   └── other_rp
│       └── 9
└── foo
    └── default
        └── 4
            └── 000000001-000000001.tsm

In this case (aside from the _internal one) there are two databases (db0 and foo) and the database db0 has two retention policies default and other_rp.

If you dropped the other_rp retention policy and because of this bug the data is still there, you can shutdown influxd and remove the other_rp folder.

@zstyblik
Copy link

@e-dard I see. Alright then, I'll keep it in mind. Although, with other fixes related to TSM, backup & restore might be worth of trying first. Thanks.

e-dard added a commit that referenced this issue Feb 18, 2016
Fixes #5653 and #5394.

Previously dropping retention policies did not propogate to local TSDB
shards. Instead, the retention policiess would just be removed from the
Meta Store.

This PR adds ensures that data associated with retention policies is
removed, when the retention policy is dropped.

Also, it cleans up a couple of other methods in `tsdb`, including the
requirement to provide (redundant) shardIDs when deleting databases.
e-dard added a commit that referenced this issue Feb 19, 2016
Fixes #5653 and #5394.

Previously dropping retention policies did not propogate to local TSDB
shards. Instead, the retention policiess would just be removed from the
Meta Store.

This PR adds ensures that data associated with retention policies is
removed, when the retention policy is dropped.

Also, it cleans up a couple of other methods in `tsdb`, including the
requirement to provide (redundant) shardIDs when deleting databases.
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

2 participants