Bug #33443
closedUI shows 0 packages\\errata\\package_groups after a bad sync followed by a successful sync for the same repo
Description
b'Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1993982 \n\n*Description of problem:*\n\nSatellite UI shows 0 packages\\errata\\package_groups after a bad sync followed by a successful sync for the same repo\n\n*Version-Release number of selected component (if applicable):*\n\nSatellite 6.10 [ satellite-6.10.0-0.6.beta.el7sat.noarch ]\n\n*How reproducible:*\n\nUnder specific circumstances\n\n*Steps to Reproduce:*\n1. Build a satellite 6.10, import manifest and enable RHEL 7Server, RHEL EUS 7.7, RHEL 6 ELS, RHEL 7 Optional repos.\n2. Sync them at once and let the sync get failed [ Could be because of https://bugzilla.redhat.com/show_bug.cgi?id=1993773 ]\n3. Now sync them individually one by one, and ensure that sync gets completed for all of them.\n4. Go to Content --> Products --> Click open the concerned product and see the counts\n5. Republish Repository metadata for an affected repo\n6. Repeate Step 4 for one of the affected repo\n7. Register a system with satellite, enable the affected repo on it and check "yum repolist"\n\n\n*Actual results:*\n\nAt Step 4 and 6, we will be able to see 0 packages reflected in UI for those repos.\n\nAt Step 7, yum will be able to show proper count of the packages from the same broken repo as well as will be able to download content from there.\n\n\n*Expected results:*\n\n\nWith second successful sync, pulp3 + katello should be able to update the count of package\\errata\\package_groups in UI properly\n\n\n*Additional info:*\n\n* I noticed this happening for big yum repos mostly i.e. > 25 GB repos\n\n* Task export , syslog , production.log and screenshots will be attached next'