Project

Profile

Help

Issue #7959

closed

Performance regression in the unit association

Added by ipanova@redhat.com over 3 years ago. Updated about 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.21.5
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

https://github.com/pulp/pulp/pull/4008 In find_repo_content_units skip db query if expected result is empty

Added by rbikar over 3 years ago

Revision 033b2e65 | View on GitHub

find_repo_content_units: skip db query if expected result is empty (#4008)

  • find_repo_content_units: skip db query if expected result is empty

For performance reasons, this change does server-side counting of units that are expected to be in result before actual db query happens. If expected count is zero, skip db query and continue to the next chunk of unit ids.

The performance problem is noticable in RHSM-pulp for big repos with 200k and more units associated. During associate action results of the most of queries in affected code will be empty so we can skip querying the db this way.

Without this fix, code will do eg. 200 unnecesary queries for repo with 200k units which will take a lot time to finish that leads to major performance regression.

Actions #1

Updated by ipanova@redhat.com over 3 years ago

  • Status changed from NEW to MODIFIED
  • Platform Release set to 2.21.5
Actions #2

Updated by ggainey about 3 years ago

Needs https://github.com/pulp/pulp/pull/4010 for tests and fixing nul-byte at end of file

Actions #3

Updated by ggainey about 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF