Bug 1306304 - [perf] cache installed set of packages in query (for updates)
Summary: [perf] cache installed set of packages in query (for updates)
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
: 1254904 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-10 14:08 UTC by 0xHM
Modified: 2016-03-26 17:58 UTC (History)
8 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-03-26 17:58:10 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1225501 None CLOSED query performance does not scale 2019-03-20 06:04 UTC

Internal Trackers: 1225501

Description 0xHM 2016-02-10 14:08:40 UTC
Description of problem:

DNF does not handle cli "repository-packages REPO upgrade" as it should.T
The problem is that current :

https://github.com/rpm-software-management/dnf/blob/master/dnf/base.py#L1559

    def upgrade_all(self, reponame=None):
        # :api
        if reponame is None:
            self._goal.upgrade_all()
        else:
            try:
                self.upgrade('*', reponame)
            except dnf.exceptions.MarkingError:
                pass

After getting to that point it will call upgrade function with packages "*".

After that it will filter all system packages, but why ?

        def is_installed_by_name(pkg_name):
            return first(self.sack.query().installed().filter(name=pkg_name))

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

1.1.6
  Installed: dnf-0:1.1.6-2.fc23.noarch at 2016-02-05 12:07
  Built    : Fedora Project at 2016-02-03 12:23

  Installed: rpm-0:4.13.0-0.rc1.11.fc23.x86_64 at 2016-02-05 11:50
  Built    : Fedora Project at 2016-02-02 11:52


Steps to Reproduce:
1. add print before with https://github.com/rpm-software-management/dnf/blob/master/dnf/base.py#L1529  you can print the package name

 
2. dnf repository-packages REPONAME upgrade
3. wait

Actual results:
prints all packages installed
slowness


Expected results:
Can be done much faster and smarter.

Additional info:

Comment 1 Honza Silhan 2016-02-10 14:27:05 UTC
Thanks for the report.

Comment 2 Honza Silhan 2016-02-10 14:27:35 UTC
*** Bug 1254904 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2016-02-25 13:53:09 UTC
dnf-plugins-core-0.1.17-1.fc23 dnf-1.1.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1

Comment 4 Fedora Update System 2016-02-25 13:56:12 UTC
dnf-plugins-core-0.1.17-1.fc22 dnf-1.1.7-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075

Comment 5 Fedora Update System 2016-03-09 17:19:36 UTC
dnf-1.1.7-2.fc23 dnf-plugins-core-0.1.17-1.fc23 libsolv-0.6.19-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1

Comment 6 Fedora Update System 2016-03-09 17:21:24 UTC
dnf-1.1.7-2.fc22 dnf-plugins-core-0.1.17-1.fc22 libsolv-0.6.19-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075

Comment 7 Fedora Update System 2016-03-10 16:52:50 UTC
dnf-1.1.7-2.fc22, dnf-plugins-core-0.1.17-1.fc22, libsolv-0.6.19-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075

Comment 8 Fedora Update System 2016-03-10 16:54:24 UTC
dnf-1.1.7-2.fc23, dnf-plugins-core-0.1.17-1.fc23, libsolv-0.6.19-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1

Comment 9 Fedora Update System 2016-03-13 23:54:51 UTC
dnf-1.1.7-2.fc23, dnf-plugins-core-0.1.17-1.fc23, libsolv-0.6.19-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-03-19 12:15:53 UTC
dnf-1.1.7-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c030d24231

Comment 11 Fedora Update System 2016-03-20 03:57:45 UTC
dnf-1.1.7-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c030d24231

Comment 12 Fedora Update System 2016-03-26 17:57:37 UTC
dnf-1.1.7-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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