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

Clean raw data metrics that do not receive measures #1385

Conversation

rafaelweingartner
Copy link
Contributor

@rafaelweingartner rafaelweingartner commented Apr 26, 2024

The truncating of the raw metrics data is only done when new measures are pushed. Therefore, if no new measures are pushed, and the archive policy is updated to reduce the back window, the raw data points for metrics that are not receiving new data points are never truncated.

The goal of this PR is to propose a method to identify metrics that are in "inactive state", meaning, not receiving new data points, and execute their raw data points truncation when the archive policy backwindow is changed.

@rafaelweingartner rafaelweingartner force-pushed the clean-raw-data-metrics-that-do-not-receive-measures branch 16 times, most recently from aa9e0ea to bd1caee Compare May 3, 2024 12:48
gnocchi/rest/api.py Outdated Show resolved Hide resolved
gnocchi/carbonara.py Outdated Show resolved Hide resolved
gnocchi/chef.py Outdated Show resolved Hide resolved
@rafaelweingartner
Copy link
Contributor Author

Thanks @chungg for the review!

I address the points you raised, and replied to some of the open questions. I am eager to see your feedback on them!

Again, thanks for the support here!

@rafaelweingartner
Copy link
Contributor Author

Thanks @chungg! Your support is much appreciated!

@rafaelweingartner
Copy link
Contributor Author

@chungg the error is caused by a numpy upgrade. I cheated a patch to address it via: #1390. After that is merged, I can rebase this one here.

chungg
chungg previously approved these changes Jun 19, 2024
gnocchi/chef.py Show resolved Hide resolved
@mergify mergify bot dismissed chungg’s stale review June 26, 2024 12:33

Pull request has been modified.

@rafaelweingartner rafaelweingartner force-pushed the clean-raw-data-metrics-that-do-not-receive-measures branch 2 times, most recently from d08a08f to 33f7331 Compare June 26, 2024 12:44
@rafaelweingartner
Copy link
Contributor Author

@chungg now this patch seems to be fine. I also squashed all commits to avoid mixing up things, as the patch was depending on others.

The truncating of the raw metrics data is only done when new measures
are pushed. Therefore, if no new measures are pushed, and the archive
policy is updated to reduce the back window, the raw data points for
metrics that are not receiving new data points are never truncated.

The goal of this PR is to propose a method to identify metrics that are
in "inactive state", meaning, not receiving new data points, and execute
their raw data points truncation when the archive policy backwindow is
changed.
@rafaelweingartner rafaelweingartner force-pushed the clean-raw-data-metrics-that-do-not-receive-measures branch from 33f7331 to ee6428b Compare June 26, 2024 12:48
Copy link
Contributor

@pedro-martins pedro-martins left a comment

Choose a reason for hiding this comment

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

Hi Rafael, the overall code looks good to me, I have only a suggestion. Thanks for the patch.

gnocchi/chef.py Outdated Show resolved Hide resolved
Copy link
Contributor

@pedro-martins pedro-martins left a comment

Choose a reason for hiding this comment

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

Nice, thanks Rafael, it looks good to me

@rafaelweingartner
Copy link
Contributor Author

Thank you guys (@pedro-martins and @chungg) for your reviews!

If you think that there is something else to be changed, let me know.

Copy link
Member

@chungg chungg left a comment

Choose a reason for hiding this comment

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

lgtm

@rafaelweingartner
Copy link
Contributor Author

lgtm

Thanks!

As soon as this one is merged, I will rebase #1386, and make it ready for review as well.

Then, we will be able to implement a solution for #1182.

@rafaelweingartner
Copy link
Contributor Author

rafaelweingartner commented Jul 3, 2024

Hello @chungg and @tobias-urdin can we merge this one. I have some time this week, and I would like to use this time to rebase the other patch as soon as this patch is merged.

@chungg chungg merged commit 57b9693 into gnocchixyz:master Jul 3, 2024
23 checks passed
@rafaelweingartner
Copy link
Contributor Author

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants