Bug #16921
closedCall candlepin's subscriptions just once when enabling a repo
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.
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
Updated by Dominic Cleal about 8 years ago
- Project changed from Foreman to Katello
- Category deleted (
Performance)
Updated by Justin Sherrill about 8 years ago
- Translation missing: en.field_release set to 197
Updated by Pavel Moravec about 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|5b542b2f5d6e49736cbdca8c53efec82b149bc8e.