Bug 1405162 - Do not index full rpm metadata if already present
Summary: Do not index full rpm metadata if already present
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Unspecified
Assignee: John Mitsch
QA Contact: Jonathon Turel
Depends On:
TreeView+ depends on / blocked
Reported: 2016-12-15 18:12 UTC by Justin Sherrill
Modified: 2019-09-25 21:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18655 0 Normal Closed Do not index full rpm metadata if already present 2021-02-10 02:17:53 UTC

Description Justin Sherrill 2016-12-15 18:12:16 UTC
Description of problem:

Currently during any repo sync, we:

1. check to see if there was any change (or mismatch of unit counts)
2. IF so we request all UUIDs of rpms in the repo
3. We then fetch all rpm units by their UUID

After chatting with mhrivnak, the unit metadata for an rpm should never change (for the fields we care about), so we could optimize this by getting the list of UUIDs and then only fetching (and updating) units that aren't in the repo.

This should speed up repo syncing quite a bit.

We may want to add a 'force' sync option to override this behavior as well.

Comment 4 John Mitsch 2017-02-23 21:09:31 UTC
Created redmine issue http://projects.theforeman.org/issues/18655 from this bug

Comment 5 Satellite Program 2017-03-13 20:16:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18655 has been resolved.

Comment 6 Jonathon Turel 2017-08-30 17:48:21 UTC
Verified in Sat 6.3 Snap 13 => satellite-6.3.0-16.0.beta.el7sat.noarch

I followed the steps in the PR: https://github.com/Katello/katello/pull/6634

=> Creating repo on filesystem with createrepo, adding a bunch of rpms, sync via HTTP, add more RPMs, sync & check output (A), sync again & check output (B)

Output A:

Started at: 2017-08-30 17:35:18 UTC
Ended at: 2017-08-30 17:35:22 UTC
Real time: 4.51s
Execution time (excluding suspended state): 4.51s
id: 5
contents_changed: true
full_index: false
current_user_id: 3

Note that full index was not run.

Output B:

id: 5
contents_changed: false
full_index: false
current_user_id: 3

post_sync_skipped: true

All output is exactly as described in the PR.

Comment 7 Satellite Program 2018-02-21 16:51:07 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> For information on the advisory, and where to find the updated files, follow the link below.
> If the solution does not work for you, open a new bug report.
> https://access.redhat.com/errata/RHSA-2018:0336

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