-
Notifications
You must be signed in to change notification settings - Fork 900
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
Conversation
b2bfd9d
to
eb15681
Compare
Test failure should be fixed with #17098 |
eb15681
to
2b44e1f
Compare
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
2b44e1f
to
4097b5c
Compare
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 |
There was a problem hiding this 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
@simaishi yay. it is green. Anything else I can provide to help merge? |
Nope, we're good now, merging. |
Manual backport of:
#17017
#17051
#17050
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553473