Bug 805193 - migration 35 is very slow when lots of errata are present
migration 35 is very slow when lots of errata are present
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: z_other (Show other bugs)
1.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: James Slagle
Preethi Thomas
: Triaged
Depends On: 805192
Blocks: 805195
  Show dependency treegraph
 
Reported: 2012-03-20 12:25 EDT by James Slagle
Modified: 2012-05-25 10:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 805192
: 805195 (view as bug list)
Environment:
Last Closed: 2012-05-25 10:14:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Slagle 2012-03-20 12:25:17 EDT
+++ This bug was initially created as a clone of Bug #805192 +++

migration 35 is very slow when lots of errata are present

The EC2 rhui's have 3000+ errata and migration 35 is taking 2+ hours to run.

--- Additional comment from jslagle@redhat.com on 2012-03-20 12:24:27 EDT ---

Because this is RHUI and no one has yet migrated past version 35, we can modify migration version 35 directly.  This will make it so that we can add the needed indexes and rewrite the slow part of the migration to be much more efficient.

We can do these same changes in pulp, but we need an additional migration (version 39) to add the indexes.

We can then also pull migration 39 back into rhui so that the 2 branches stay on the same db version.  version 39 will essentially be a no-op in the rhui branch since the indexes were already added as part of 35.
Comment 1 James Slagle 2012-03-20 12:56:30 EDT
cherry picked to pulp_v1 d8de721b9c0141d232f642cff0b3aa3e91f976e4
Comment 2 Jeff Ortel 2012-04-12 18:59:09 EDT
build: 0.282
Comment 3 Preethi Thomas 2012-05-02 15:31:53 EDT
verified
[root@pulp-v1-server ~]# rpm -q pulp
pulp-1.1.6-1.el6.noarch
[root@pulp-v1-server ~]# 

[[root@pulp-v1-server ~]# pulp-migrate
removing persisted tasks
database migration to version 40 complete


migration to data model version 37 started
migration to data model version 37 complete
migration to data model version 38 started
migration to data model version 38 complete
migration to data model version 39 started
Dropping index description_-1 from errata collection.
Dropping index description_-1 from package collection.
Dropping index packagegroups_-1 from package collection.
Dropping index packagegroupcategories_-1 from package collection.
Adding index on errata to Repo collection.
migration to data model version 39 complete
migration to data model version 40 started
migration to data model version 40 complete

[root@pulp-v1-server ~]# pulp-admin -u admin -p admin repo list
+------------------------------------------+
       List of Available Repositories
+------------------------------------------+

Id                 	rhel6_2                  
Name               	rhel6_2                  
Repo URL           	https://pulp-v1-server.usersys.redhat.com/pulp/repos/content/dist/rhel/rhui/server/6/6.2/x86_64/os/
Feed URL           	https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.2/x86_64/os/
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:Yes   Cert:Yes
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	7079                     
Files              	0                        
Distributions      	ks-Red Hat Enterprise Linux-Server-6.2-x86_64
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{}                       
Preserve Metadata  	False                    
Checksum Type      	sha                      


Id                 	zoo                      
Name               	zoo                      
Repo URL           	https://pulp-v1-server.usersys.redhat.com/pulp/repos/zoo/
Feed URL           	http://repos.fedorapeople.org/repos/katello/katello/6Server/x86_64/
Feed Type          	remote                   
Content Type       	yum                      
Feed Certs         	CA:No   Cert:No
Consumer Certs     	CA:No   Cert:No
Architecture       	noarch                   
Sync Schedule      	None                     
Packages           	159                      
Files              	0                        
Distributions      	None                     
Publish            	True                     
Clones             	[]                       
Groups             	None                     
Filters            	[]                       
Notes              	{u' ': u' '}             
Preserve Metadata  	False                    
Checksum Type      	sha256
Comment 4 Preethi Thomas 2012-05-25 10:14:32 EDT
Pulp v1.1 Release

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