Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1339301

Summary: REST fetch of groups doesn't scale
Product: [JBoss] JBoss Operations Network Reporter: bkramer <bkramer>
Component: RESTAssignee: Michael Burman <miburman>
Status: CLOSED ERRATA QA Contact: Filip Brychta <fbrychta>
Severity: high Docs Contact:
Priority: high    
Version: JON 3.3.5CC: fbrychta, spinder, stianlund+bugzilla
Target Milestone: ER01Keywords: Triaged
Target Release: JON 3.3.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 15:31:58 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: 1337995    
Bug Blocks:    

Description bkramer 2016-05-24 15:43:01 UTC
Jay Shaughnessy 2016-05-20 12:22:56 EDT

Fetching groups via REST does not scale.  This is due to the code always fetching all implicit and explicit resources for the fetched groups.

AbstractRestBean.fillGroup() is the problem, it pulls in a bunch of lazy-load data, most notably, all of the group's resources.

Note that fillGroup is used in some other rest services as well.

To recreate just rhqhost:7080/rest/group.html, as the group membership grows so will the resources consumed, until it falls over.

Comment 1 bkramer 2016-05-24 15:45:18 UTC
Jay Shaughnessy 2016-05-20 14:42:41 EDT
PR sent: https://github.com/rhq-project/rhq/pull/255

Comment 2 Michael Burman 2016-05-25 07:27:41 UTC
Merged to master:

commit 0b4f5382b13728d4265069c40ab82ae54aae30a9
Author: jshaughn <jshaughn.home>
Date:   Fri May 20 14:35:45 2016 -0400

    Bug 1337995 REST fetch of groups doesn't scale
    - Don't pull in all resources for every fetched group
    - Avoid umbrella transaction

Comment 3 Stian Lund 2016-05-25 09:58:44 UTC
Thanks for fixing this so

I am very interested in testing this fix, if there are any ways to for instance build a single jar/war with the fix that I can pop into my JON installation. If so I can verify that the fixes solves the problem locally.

PS I am not good at building from code so it will need to be a pre-built file ;)

Stian

Comment 6 Simeon Pinder 2016-07-07 08:23:06 UTC
Moving to ON_QA as available to test with the following build:
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=502442

Note: 	jon-server-patch-3.3.0.GA.zip maps to JON 3.3.6(jon-server-3.3.0.GA-update-06.zip)

Comment 8 errata-xmlrpc 2016-07-27 15:31:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-1519.html