[Yum-devel] Patches for rpmdb caching in yum
Seth Vidal
skvidal at fedoraproject.org
Thu Nov 12 22:00:51 UTC 2009
On Sun, 8 Nov 2009, James Antill wrote:
> Here's the full patch:
>
> http://james.fedorapeople.org/yum/patches/rpmdb-cache-BIG.path
>
> It should be good to merge, and I've tested it quite a bit, including
> writting ./test/rpmdb-cache.py which will check that the cache gives an
> identical answer to what we'd get without the cache.
>
> Due to the way it uses rpmdb version, it'll be pretty hard to alter the
> rpmdb without invalidating the cache ... although it's possible to do if
> you work at it, it should be impossible due to problems (power failure in
> a transaction etc.).
>
> The patch (ab)uses <cachedir>/rpmdb-cache/ for the place to store it's
> cached data ... anyone hate the name? Other obvious candidates are:
> <cachedir>/main/
> <cachedir>/installed/
> /var/lib/yum/... (although that means only root can write)
>
> It adds 5 new APIs for RPMDBPackageSack (YumBase.rpmdb) ...
>
> def returnConflictPackages(self):
> def fileRequiresData(self):
> def transactionCacheFileRequires(self, installedFileRequires,
> installedUnresolvedFileRequires,
> installedFileProvides,
> problems):
> def transactionCacheConflictPackages(self, pkgs):
> def transactionResultVersion(self, rpmdbv):
>
> And it adds .cleanRpmDB to YumBase.
>
> Now for the "good" stuff:
>
> echo | yum update FOO ... takes ~65% the time (~4.2 seconds to ~2.8)
> yum version nogroups ... takes ~50% the time (~1.2 seconds to ~0.6)
>
I've been thinking about this patch for a while. It worries me b/c of the
potential impacts and just for cleanliness.
So I'm thinking we should take this patch set - put it in one big patch
and roll it into a package for rawhide - see if anything comes out of it.
Would you be okay doing that?
-sv
More information about the Yum-devel
mailing list