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

[FINE] Truncate realtime metrics instead of purging #17124

Merged
merged 3 commits into from
Mar 16, 2018

Conversation

gtanzillo
Copy link
Member

@gtanzillo gtanzillo commented Mar 8, 2018

@gtanzillo gtanzillo added the bug label Mar 8, 2018
@gtanzillo gtanzillo changed the title Truncate realtime metrics instead of purging [FINE] Truncate realtime metrics instead of purging Mar 8, 2018
@kbrock
Copy link
Member

kbrock commented Mar 8, 2018

The first 2 commits are extra.

Also, I see #17017 and #17050 - but do not see #17051 (which has some specs around the reindex method)

@gtanzillo gtanzillo force-pushed the truncate-realtime-fine branch 2 times, most recently from b2bfd9d to eb15681 Compare March 8, 2018 21:18
@gtanzillo
Copy link
Member Author

Test failure should be fixed with #17098

@gtanzillo gtanzillo requested a review from kbrock March 8, 2018 22:09
@gtanzillo gtanzillo closed this Mar 8, 2018
@gtanzillo gtanzillo reopened this Mar 8, 2018
@gtanzillo gtanzillo force-pushed the truncate-realtime-fine branch from eb15681 to 2b44e1f Compare March 8, 2018 23:18
kbrock added 3 commits March 8, 2018 18:25
The metrics table is separated into sub tables:
metrics_00 - metrics_23, one table per hour.

Deleting from the parent table delegating the deletes to the child
tables. The batching for these deletes sometimes conflicts with the
delegation and causes the process to run slowly.

The purging process is aware of the delegation. It truncates the hourly
table not associated with dates in the retain window. This removes the
need for batching. Also, truncate is a more streamlined procedure.

As long as this runs often, this will properly purge the metrics.

* rule of thumb: (interval + retain) < 12.hours.
* May work with total higher than 12 hours, but it is not advised
* Default retain period is to keep 4 hours worth of data
* Default purge interval is to run every 21 minutes.

- https://bugzilla.redhat.com/show_bug.cgi?id=1537733
- https://bugzilla.redhat.com/show_bug.cgi?id=1553473
@gtanzillo gtanzillo force-pushed the truncate-realtime-fine branch from 2b44e1f to 4097b5c Compare March 8, 2018 23:26
@miq-bot
Copy link
Member

miq-bot commented Mar 8, 2018

Checked commits gtanzillo/manageiq@d759a20~...4097b5c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
4 files checked, 0 offenses detected
Everything looks fine. 👍

Copy link
Member

@kbrock kbrock left a comment

Choose a reason for hiding this comment

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

merge looks good

confused by the failures

@gtanzillo gtanzillo closed this Mar 13, 2018
@gtanzillo gtanzillo reopened this Mar 13, 2018
@simaishi simaishi self-assigned this Mar 14, 2018
@gtanzillo gtanzillo closed this Mar 15, 2018
@gtanzillo gtanzillo reopened this Mar 15, 2018
@kbrock
Copy link
Member

kbrock commented Mar 16, 2018

@simaishi yay. it is green. Anything else I can provide to help merge?

@simaishi
Copy link
Contributor

Nope, we're good now, merging.

@simaishi simaishi merged commit f737b7e into ManageIQ:fine Mar 16, 2018
@simaishi simaishi added this to the Sprint 82 Ending Mar 26, 2018 milestone Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants