Gentoo Archives: gentoo-portage-dev

From: Brian Harring <ferringb@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] rsync metadata cache patch (obsoletes metadata transfer on sync)
Date: Sat, 28 Jan 2006 19:38:34
Message-Id: 20060128193720.GJ17550@nightcrawler.had1.or.comcast.net
In Reply to: Re: [gentoo-portage-dev] [PATCH] rsync metadata cache patch (obsoletes metadata transfer on sync) by Andrew Gaffney
1 On Sat, Jan 28, 2006 at 11:24:18AM -0600, Andrew Gaffney wrote:
2 > Zac Medico wrote:
3 > >I have reimplemented the previous patch as a normal cache module that adds
4 > >a writable layer on top of the pre-generated metadata. If you'd like to
5 > >try this out (with portage-2.1_preX), simply copy metadata_overlay.py into
6 > >/usr/lib/portage/pym/cache/ and add portdbapi.auxdbmodule =
7 > >cache.metadata_overlay.database to /etc/portage/modules.
8 > >
9 > >I haven't tested this much, but like the previous patch, this shouldn't
10 > >cause any harm. Feedback would be appreciated.
11 >
12 > Portage didn't explode and dep calculation is pretty damn quick with an
13 > empty /var/cache/edb/dep/,
14
15 Shouldn't be any difference here, if you are seeing a difference
16 please time it and post the stats here- it should actually be slightly
17 slower then a straight flat_hash cache since it's 2 lookups worst case
18 instead of single lookup.
19
20 If you're seeing a difference, indicative of one of the
21 following
22 1) I'm a moron and am missing something,
23 2) innefficiency in flat_hash pulls (since you should be using
24 metadata for most of the queries, the actual underlying ro cache)
25 3) something is funky.
26
27 > Is it normal for /var/cache/edb/dep/${PORTDIR}/ to be re-created
28 > (it's still empty) when this new module is in use?
29
30 Flat_hash does that up front so it doesn't have to do tests for the
31 directory on __setitem__ calls; so yes, normal :)
32
33
34 Additional issue here zach pointed out is that the current flat_list
35 cache format used for rsync metadata/cache doesn't actually bundle
36 eclass mtimes, so stale detection for eclasses won't work via this.
37
38 Part of the reason the metadata class exists (and can handle
39 flat_list/flat_hash internally on it's own)- until flat_hash is the
40 rsync tree format, staleness detection won't work for running straight
41 from $PORTDIR/metadata/cache
42
43 ~harring