Bug #20946
clean_installed_packages script logs a count(*), causing slow performance
Description
The clean_installed_packages.rake script prints the count of remaining records for every batch of 20,000. This query can take upwards of two hours on a busy katello system.
Additionally, the script will error out if any records are modified in between the time the "existing" list is created, and the time the batch is cleaned. This can happen if a new system is registered while the script runs.
Associated revisions
History
#1
Updated by The Foreman Bot almost 5 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/6954 added
#2
Updated by Chris Duryee almost 5 years ago
- Bugzilla link set to 1483677
#3
Updated by Chris Duryee almost 5 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|cc0b15fb330178aca8317873eaaf2ef1b280d1d7.
#4
Updated by Justin Sherrill almost 5 years ago
- Legacy Backlogs Release (now unused) set to 250
Fixes #20946 - fix log messages for cleanup script
The cleanup script was doing a count(*) on a large table, which could
take hours on a busy system. This has been removed.
Additionally, if a deletion fails due to data changing while the script
runs, the script will log a message but continue. The bulk delete
setting will not be updated unless there is a :100:% clean run.