-
Notifications
You must be signed in to change notification settings - Fork 897
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
Add Vacuum to Job Scheduler #16940
Add Vacuum to Job Scheduler #16940
Conversation
lib/extensions/ar_adapter/ar_dba.rb
Outdated
@@ -869,4 +869,8 @@ def vacuum_analyze_table(table) | |||
def vacuum_full_analyze_table(table) | |||
execute("VACUUM FULL ANALYZE #{quote_table_name(table)}") | |||
end | |||
|
|||
def vacuum_full_table(table) |
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.
I think we should probably go with the vacuum_full_analyze_table
here. No reason not to really.
lib/extensions/ar_base.rb
Outdated
def self.vacuum | ||
_log.info("Vacuuming table #{table_name}") | ||
result = connection.vacuum_full_table(table_name) | ||
_log.info("Completed Vacuuming of table #{table_name} with result #{result.result_status}") |
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.
What does result
look like when it's logged here?
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.
@carbonin it's a 1 or a 0 hah
config/settings.yml
Outdated
@@ -89,6 +89,31 @@ | |||
- Metric | |||
- MiqQueue | |||
- MiqWorker | |||
:vacuum_schedule: "36 * * * *" |
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.
What does this come out to in English? I thought it was weekly. Is this every hour on the 36th minute?
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.
@carbonin TBH I put this here and then forgot to update it. What should we put for periodic? Every other day? Every 2 days?
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.
I was thinking weekly. Maybe queue it Saturday early AM in case it runs long?
Add vacuum to job scheduler on a 36 hour schedule. Previously this was done periodically as configured via the appliance console.
config/settings.yml
Outdated
@@ -89,6 +89,31 @@ | |||
- Metric | |||
- MiqQueue | |||
- MiqWorker | |||
:vacuum_schedule: "0 2 * * 6" | |||
:vacuum_tables: | |||
- Vm |
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.
Can we list these alphabetically?
Or you could leave it to @bdunne to do in a followup, he loves stuff like that
Checked commits jntullo/manageiq@d2db9c2~...bf3d79c with ruby 2.3.3, rubocop 0.52.0, 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.
Looks great!
@jntullo Please add BZ link. |
Add Vacuum to Job Scheduler (cherry picked from commit c2c05d5) https://bugzilla.redhat.com/show_bug.cgi?id=1553795
Gaprindashvili backport details:
|
https://bugzilla.redhat.com/show_bug.cgi?id=1571246 Fixes: translation missing: en.advanced_settings.db_maintenance in Advanced Settings menu of the appliance console. The DB maintenance menu was removed in: ManageIQ#32 It was replaced with: ManageIQ/manageiq#16929 ManageIQ/manageiq#16940
Add vacuum to job scheduler on a 36 hour schedule. Previously this was done periodically as configured via the appliance console.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1553772
@miq-bot assign @carbonin
@miq-bot add_label core, enhancement, gaprindashvili/yes