Project

General

Custom queries

Profile

Actions

Bug #18376

closed

showing Content -> Errata with "Installable" checkbox checked hakes too much time and memory when on scale

Added by Thomas McKay over 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Errata Management
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1417642

Description of problem:
With 5 errata and 6138 clients registered, showing Content -> Errata with "Installable" checkbox checked hakes too much time and memory

Version-Release number of selected component (if applicable):
satellite-6.2.6-2.0.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. Have 6138 clients registered, each with 5 installable erratas
(same 5 in our case)
2. Go to Content -> Errata

Actual results:
Takes more than 8 minutes to load the page, Ruby RSS memory goes from 4 to 10 GB

Expected results:
Should be faster

Additional info:


Related issues 1 (0 open1 closed)

Has duplicate Katello - Bug #18652: Listing Applicable hosts for any errata takes long time at scaleDuplicateJohn Mitsch02/23/2017Actions

Added by Partha Aji about 8 years ago

Revision bd158ce1 (diff)

Fixes #18376 - Improved Installable Errata search

Go to Content -> Errata and select the Installable check box
Prior to this commit the "installable_for_hosts" method would create a
introduce an extra 'inner join' causing the query to perform painfully
slow. This commit fixes that by selectively adding that duplicate join
table only if required.

The installable repo query also had a duplicate join for the katello
errata table. Which got removed in this commit

Also fixed the unit tests to highlight the point that "Installable
Errata" is determined by the repositories bound to that host.
Basically the query says "Find all applicable errata on this host.
Filter this list further by only including those repos that are enabled
on this host"

Fixed the unit tests to something that make more sense.

Installable errata is determined purely by the repos that are bound to
the host. It does not really matter what environment/content view
this host belongs. CVE gives the master list of repos available to the
host of which only a subset are enabled or bound.

Actions

Also available in: Atom PDF