Project

General

Profile

Actions

Bug #16921

closed

Call candlepin's subscriptions just once when enabling a repo

Added by Pavel Moravec about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by The Foreman Bot about 8 years ago

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

Updated by Dominic Cleal about 8 years ago

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

Updated by Justin Sherrill about 8 years ago

  • Translation missing: en.field_release set to 197
Actions #4

Updated by Pavel Moravec about 8 years ago

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

Also available in: Atom PDF