Bug 2038995 - When executing the content migration (pre-upgrade process), there is a PG query created by pulp that will be sitting forever
Summary: When executing the content migration (pre-upgrade process), there is a PG que...
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.10.0
Hardware: All
OS: All
urgent vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lai
Depends On:
TreeView+ depends on / blocked
Reported: 2022-01-10 17:34 UTC by Waldirio M Pinheiro
Modified: 2022-01-14 20:29 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Target Upstream Version:

Attachments (Terms of Use)

Description Waldirio M Pinheiro 2022-01-10 17:34:42 UTC
Description of problem:
When proceeding with the pulp2 - pulp3 migration, the process will execute some PG queries and according to the # of entries in the customer, this query can spend a long time.

Foe example, here, we can see a single query spent ~12h

pulpcore=# SELECT COUNT(*) AS "__count" FROM "pulp_2to3_migration_pulp2rpm" INNER JOIN "pulp_2to3_migration_pulp2content" ON ( "pulp_2to3_migration_pulp2rpm"."pulp2content_id" = "pulp_2to3_migration_pulp2content"."pulp_id" ) where not (not ("pulp_2to3_migration_pulp2content"."pulp3_content_id" IS NULL) and not ( "pulp_2to3_migration_pulp2content"."pulp2_id" IN (SELECT DISTINCT U0."pulp2_unit_id" FROM "pulp_2to3_migration_pulp2lazycatalog" U0 WHERE U0."is_migrated" = false )));

(1 row)

Time: 42712560.277 ms (11:51:52.560)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Enable and sync a lot of repositories, all of them as immediate
2. Proceed with the migration

Actual results:
The process will spend a long time, checking the pulp API, we can see the same step of the pulp talk will be there for hours and the PG will be running the query for hours/days.

Expected results:
The content migration be faster and the PG be not stuck with any kind of query.

Additional info:

Note You need to log in before you can comment on or make changes to this bug.