Bug 1098313

Summary: The system details pages are slow for no reason if system has many virtual guests
Product: [Community] Spacewalk Reporter: Stephen Herr <sherr>
Component: ServerAssignee: Stephen Herr <sherr>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.2   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-2.2.67 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-17 08:41:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1119298    

Description Stephen Herr 2014-05-15 18:46:26 UTC
Description of problem:
Any of the System Details pages are very slow for no good reason if the system happens to have many virtual guests (in my case, 2000, or at least 1 guest that has registered 2000 times). This is because to determine what icon to display next to the server name we have to see if the system is a virtual host, we are currently doing that by having Hibernate hydrate every guest and then returning "True" if the list of guests is larger than 0.

This is stupid, instead we should just have a query that returns a "1" or something if the server is a virtual host.

How reproducible:
Always

Steps to Reproduce:
1. Register a host's guest several thousand times
2. navigate to Systems -> <system_name> -> <any of these pages>

Actual results:
Those pages are all very slow

Expected results:
They should be an appropriate speed and only load details for the guests if they actually need that information.

Comment 1 Stephen Herr 2014-05-15 20:54:07 UTC
Committed to Spacewalk master:
f9a968822a7c75601c08d6a7e4b297b6aef11361

Comment 2 Stephen Herr 2014-05-19 12:49:35 UTC
And:
301ef611efb116be865760d452907df7edd4daeb

Comment 3 Milan Zázrivec 2014-07-17 08:41:22 UTC
Spacewalk 2.2 has been released:

    https://fedorahosted.org/spacewalk/wiki/ReleaseNotes22