Bug 549553
| Summary: | Channel->Packages->Remove packages is slow (sometimes UI times out and actual removal of ~6000pkgs take over 1 hr) | ||
|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Xixi <xdmoon> |
| Component: | Server | Assignee: | Justin Sherrill <jsherril> |
| Status: | CLOSED ERRATA | QA Contact: | Garik Khachikyan <gkhachik> |
| Severity: | high | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 520 | CC: | cperry, gkhachik, mkoci, tao, xdmoon |
| Target Milestone: | --- | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-02-16 08:39:22 UTC | Type: | --- |
| 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: | 518256 | ||
|
Description
Xixi
2009-12-21 23:15:05 UTC
Oracle does not show high resource consumption as java does under top, and Oracle statspack report confirms it. This seems to be a performance issue in the java layer, possibly inefficiency in the following code?
spacewalk-java-0.5.44/code/src/com/redhat/rhn/frontend/action/channel/manage/ChannelPackagesRemoveAction.java
...
/** {@inheritDoc} */
public ActionForward execute(ActionMapping mapping,
ActionForm formIn,
HttpServletRequest request,
HttpServletResponse response) {
...
RhnSet set = RhnSetDecl.PACKAGES_TO_REMOVE.get(user);
DataResult result = PackageManager.packageIdsInSet(user, set.getLabel(), null);
TagHelper.bindElaboratorTo(LIST_ACTION, result.getElaborator(), request);
request.setAttribute("cid", chan.getId());
request.setAttribute("channel_name", chan.getName());
request.setAttribute(ListTagHelper.PARENT_URL, request.getRequestURI()); request.setAttribute("pageList", result);
String button = LocalizationService.getInstance().getMessage(
"channel.jsp.package.confirmbutton");
if (button.equals(request.getParameter("confirm")) && set.size() > 0) {
removePackages(user, chan, set);
...
private void removePackages(User user, Channel chan, RhnSet set) {
for (Long id : set.getElementValues()) {
chan.removePackage(PackageFactory.lookupByIdAndUser(id, user));
}
List<Long> packList = new ArrayList<Long>();
packList.addAll(set.getElementValues());
ErrataCacheManager.deleteCacheEntriesForChannelPackages(chan.getId(), packList);
ChannelManager.refreshWithNewestPackages(chan, "web.channel_package_remove");
}
...
fixed in master. baf5885465437d3797cbf53144998f996db74358 Package removal now should take a couple of seconds. Test Packages now available # VERIFIED Tried the reproducer for a fresh installed Satellite 5.3.0 and for a cloned RHEL 5 i386 server base channel. After 2 minute of loading it gave an ISE and only service restart helped to bring system be operational. With the packages fix, it does removes the ~6300 packages in about 25 sec without any problem and still stays operational :) Many thanks for the fix. Checked against Satellite installed on RHEL 4 AS, RHEL 5 Server. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0105.html |