Bug 1339301 - REST fetch of groups doesn't scale
Summary: REST fetch of groups doesn't scale
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: REST
Version: JON 3.3.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER01
: JON 3.3.6
Assignee: Michael Burman
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On: 1337995
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-24 15:43 UTC by bkramer
Modified: 2019-10-10 12:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 15:31:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2342591 0 None None None 2016-05-27 10:47:46 UTC
Red Hat Product Errata RHSA-2016:1519 0 normal SHIPPED_LIVE Critical: Red Hat JBoss Operations Network 3.3.6 update 2016-08-26 00:44:36 UTC

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


Note You need to log in before you can comment on or make changes to this bug.