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

Support deleting timeseries by name during schema upgrades #6040

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

bnaecker
Copy link
Collaborator

This adds support for listing timeseries by name in a schema upgrade directory, and deleting all records (schema and data) from those timeseries during an offline ClickHouse database upgrade. The main goal here is a relatively simple but effective mechanism to clean up abandoned timeseries, while we figure out how to implement breaking changes more robustly.

We alreay have examples of these abandonded timeseries in some existing installations. The existing effort to move timeseries to TOML also presents an opportunity to make one-time breaking changes for individual timeseries. Both of these can be supported with this mechanism.

Fixes #5266

This adds support for listing timeseries by name in a schema upgrade
directory, and deleting all records (schema and data) from those
timeseries during an offline ClickHouse database upgrade. The main goal
here is a relatively simple but effective mechanism to clean up
abandoned timeseries, while we figure out how to implement breaking
changes more robustly.

We alreay have examples of these abandonded timeseries in some existing
installations. The existing effort to move timeseries to TOML also
presents an opportunity to make one-time breaking changes for individual
timeseries. Both of these can be supported with this mechanism.

Fixes #5266
@bnaecker bnaecker requested review from zeeshanlakhani and ahl July 10, 2024 21:27
oximeter/db/src/lib.rs Outdated Show resolved Hide resolved
oximeter/db/src/client/mod.rs Show resolved Hide resolved
oximeter/db/src/client/mod.rs Show resolved Hide resolved
- Rename error variant for clarity
- Comment on deletion batch size
Copy link
Collaborator

@zeeshanlakhani zeeshanlakhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last thing may be a comment on the "aggressive delete"? But yeah, the tests look good on this front.

Copy link
Contributor

@ahl ahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great; apologies for the delay

@bnaecker bnaecker merged commit 76dc293 into main Jul 16, 2024
19 checks passed
@bnaecker bnaecker deleted the delete-specific-timeseries-during-upgrade branch July 16, 2024 04:53
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

Successfully merging this pull request may close these issues.

Want mechanism for deleting individual timeseries schema during offline upgrade
3 participants