Project

General

Profile

Bug #16921

Call candlepin's subscriptions just once when enabling a repo

Added by Pavel Moravec over 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Enabling a repository requires two calls of candlepin's subscriptions - once for getting entitlement certificate, once for getting its key. Since each such candlepin call means generating & sending over SSL & processing several MBs of data (since all subscriptions to all products are retrieved from candlepin), the repository enable takes redundant time.

Let call the candlepin GET request just once and store the values in another lazy accessor variable.

Reproducer: enable a repo and meantime grep in candlepin logs for:

2016-10-13 17:42:19,759 [thread=http-bio-8443-exec-6] [req=508b0bd7-6540-4431-a3c7-2d521ff463ee, org=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/owners/Default_Organization/subscriptions

that will appear twice.

With the fix I will propose, I was able to decrease the time for enabling a repo from 7s to 5s on my machine.

Associated revisions

Revision 5b542b2f (diff)
Added by Pavel Moravec over 5 years ago

Fixes #16921 - Get candlepin's subs just once when repo enabling

Fixes #16921

Signed-off-by: Pavel Moravec <>

History

#1 Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6394 added

#2 Updated by Dominic Cleal over 5 years ago

  • Project changed from Foreman to Katello
  • Category deleted (Performance)

#3 Updated by Justin Sherrill over 5 years ago

  • Legacy Backlogs Release (now unused) set to 197

#4 Updated by Pavel Moravec over 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF