Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Support "archive" in tags/delByQuery #1977

Closed
shanson7 opened this issue May 12, 2021 · 2 comments · Fixed by #1978
Closed

Support "archive" in tags/delByQuery #1977

shanson7 opened this issue May 12, 2021 · 2 comments · Fixed by #1978
Labels

Comments

@shanson7
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

Currently delByQuery deletes series from both memory and cassandra. It would be nice to support an option to archive similar to mt-index-prune.

Describe the solution you'd like

An additional option to delByQuery named method (or similar) that can currently have the options delete or archive. Perhaps memory to delete from the memory index only (though I could see this causing issues).

Additional context

Combined with #1976 this would allow us to more safely "delete"/"prune" data from Metrictank.

@Dieterbe
Copy link
Contributor

interesting idea.
currently, mt-index-prune (or more generally moving metricDefs to the archive table) is an optimization, something that by itself shouldn't have user visible impact, as it should only move metricDefs that have already been expired and thus are not in the in memory index anyway.

so your idea is basically to explicitly move unexpired entries from the main table (and the in memory idx) to the archive table. This goes beyond what this mechanic was designed for, but i see how it can make sense.
It sounds like something that can be done without breaking anything.

@Dieterbe
Copy link
Contributor

At a quick glance, your PR looks lean and clean.

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

Successfully merging a pull request may close this issue.

2 participants