be552d99a4
The Housekeeping service grows in utilization of CPU as more amphorae are created and/or marked as DELETED. The problem lays on the SELECT statement constructed in get_all_deleted_expiring_amphora via the ORM -- it is joined eager loading all relationships. The task does not need such amount of information, only the amphora ID. The statement could be simplified by not loading any relationship or, at most, lazy loading them. This patch also fixes performance of cleaning up deleted and expired load balancers. The code was doing multiple round-trips to the database unecessarily: 1. retrieving all deleted LBs 2. for each LB, retrieving it again from DB to check expired date 3. delete LB Step 1 and 2 are now condensed in get_all_deleted_expiring(), making it a single round-trip. Story: 2004665 Task: 28643 Change-Id: Iffc960c7c3a986328cfded1b4e408931ab0a7877
7 lines
210 B
YAML
7 lines
210 B
YAML
---
|
|
fixes:
|
|
- |
|
|
Fixed a performance issue where the Housekeeping service could
|
|
significantly and incrementally utilize CPU as more amphorae and load
|
|
balancers are created and/or marked as DELETED.
|