Bug 754613

Summary: Createrepo Misses Packages Using --workers Argument together with --update
Product: [Fedora] Fedora EPEL Reporter: Erik Osterman <e>
Component: createrepoAssignee: Jeff Sheltren <sheltren>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: el5CC: james.antill, sheltren
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-06 10:06:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Erik Osterman 2011-11-17 02:00:12 UTC
Description of problem:
 
There is a problem when updating an RPM repository using workers. It seems to be a factor of the number of packages in the repo and the number of workers.

For example:
1) a repo with 4 packages and 6 workers fails; only 3 packages to be found. 
2) the same repo with 4 packages and 7 workers works fine; 4 packages found 
3) a repo with 5 packages and 6 workers works fine; 5 packages found
4) a repo with 5 packages and 9 workers fails; only 4 packages found


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

createrepo-0.9.9-1



How reproducible:

100%  reproducible. 

TEST CASE 1: Even number of packages
Steps to Reproduce:
1. mkdir -p /tmp/test/RPMS
2. Put 4 RPMS into /tmp/test/RPMS
3.  ls -1 /tmp/test/RPMS/; 
     rm -rf /tmp/test/repodata/; 
     createrepo /tmp/test/ --checksum=sha --update --workers 6
     for i in /tmp/test/repodata/*.bz2; do bunzip2 -f $i;done;   
     sqlite3 /tmp/test/repodata/*primary*.sqlite 'select name, version, release from packages;'
 
Actual results:
4 RPMs will be listed (ls -1 /tmp/test/RPMS/), but only 3 RPMs will be returned in the sqlite database

Expected results:
4 RPMS should be found in the sqlite database

TEST CASE 2: Odd number of packages
Steps to Reproduce:
1. mkdir -p /tmp/test/RPMS
2. Put 5 RPMS into /tmp/test/RPMS
3.  ls -1 /tmp/test/RPMS/; 
     rm -rf /tmp/test/repodata/; 
     createrepo /tmp/test/ --checksum=sha --update --workers 9
     for i in /tmp/test/repodata/*.bz2; do bunzip2 -f $i;done;   
     sqlite3 /tmp/test/repodata/*primary*.sqlite 'select name, version, release from packages;'
 
Actual results:
5 RPMs will be listed (ls -1 /tmp/test/RPMS/), but only 4 RPMs will be returned in the sqlite database

Expected results:
5 RPMS should be found in the sqlite database

Additional info:

If you play around with the number of "--workers" it will work. For example, using 10 workers works for 5 RPMs (returns 5), but fails for 4 RPMs (returns 3). Using 9 workers works for 4 RPMs (returns 4) but not for 5 RPMs (returns 4).

Comment 2 Erik Osterman 2012-02-27 19:19:49 UTC
Thanks! Glad this was fixed so quickly.

Comment 3 Fedora End Of Life 2017-04-06 10:06:29 UTC
Fedora EPEL 5 changed to end-of-life (EOL) status on 2017-03-31. Fedora EPEL 5
is no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora
or Fedora EPEL, please feel free to reopen this bug against that version. If
you are unable to reopen this bug, please file a new report against the current
release. If you experience problems, please add a comment to this bug.

Thank you for reporting this bug and we are sorry it could not be fixed.