Bug 1048988
| Summary: | [plugins] [api] add a hook for MD refresh | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Elad Alfassa <elad> |
| Component: | dnf | Assignee: | Ales Kozumplik <akozumpl> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | akozumpl, elad, jzeleny, pnemade, rholy |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | dnf-0.4.11-1.fc20 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-01-11 08:48:04 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Elad Alfassa
2014-01-06 17:21:00 UTC
Elad, I thought the hook would be for any time the MD refresh happens, no? Some people never run makecache FWIW. I might have confused you about disliking the time penalty: I don't mind adding a few ms to every run where new metadata is downloaded, I just don't like adding a few ms to *every run*. > I just don't like adding a few ms to *every run*. neither do I. > I thought the hook would be for any time the MD refresh happens, no? You said that's hard. I suggested makecache as a compromise. The timer also runs makecache, so if we assume most people will not turn it off those few ms will be added to a background process, which means users won't notice the slowness, and it'd be also easier for you to implement. Anyway, I'm okay with having that hook on MD refresh OR every time makecache is run. Either is fine for my use. hmmm, I just looked at your plugin in detail, you do: available_packages = self.base.sack.query().available() Which means you'll still have to wait for the sack() trigger to fire because you need the sack to be ready. So I guess what we really need is a way to determine if any MD has been updated during while the sack was built, rather then the hook. Admittedly a combination of the two can yield the same results but I think being able to tell where we got the MD from (cache vs. origin) is useful for more API clients then the refresh hook. Makes sense, but need to make sure this value will be set to "origin" even if just one repo was updated. this value is now set per-repo (repo.metadata.fresh), see 7e793fc. So I should loop on every enabled repo, and if repo.metadata.fresh is set, regen the cache? Yes. dnf-0.4.11-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/dnf-0.4.11-1.fc20 Package dnf-0.4.11-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-0.4.11-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-0573/dnf-0.4.11-1.fc20 then log in and leave karma (feedback). dnf-0.4.11-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. |