[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] archive-mirror not pushing cacherevs?
From: |
Miles Bader |
Subject: |
Re: [Gnu-arch-users] archive-mirror not pushing cacherevs? |
Date: |
Sun, 11 Jan 2004 20:17:03 -0500 |
User-agent: |
Mutt/1.3.28i |
On Sun, Jan 11, 2004 at 07:50:36PM -0500, James Blackwell wrote:
> > If file-append isn't possible, how about a directory in the root of the
> > archive (`=cachedrevs') with an entry for each cached revision (the names
> > could simply be the full revisions; the contents probably don't matter, but
> > maybe they could be a checksum or something).
>
> I like this, but is this race safe?
>
> Imagine Bob and Alice are working on gnupg, in a shared archive.
>
> Bob and Alice both commit at almost, but not exactly, the same time. If
> Alice starts before Bob, but Bob finishes before Alice, then Alices
> cacherev entry might end up missing.
I don't understand what you mean. If the top-level `cached rev hints' index
is based on adding files to a directory, they'll both succeed, whatever the
order is (they know the proper revision name if the commit -- which is locked
-- succeeds).
The only subtlety I can think of is what `uncacherev' should do -- then a
race _does_ matter (for instance, two people do `cachrev' and `uncachrev'
simultaneously), though I suppose it's a pretty unusual case. A simple
implementation might just say `never delete the hint files', since really
they're advisory anyway. That would mean that `uncachrev', or a `cachrev -
uncachrev - cacherev' sequence would probably _not_ be detected by
archive-mirror -- but maybe the latter case doesn't matter, as the cached
contents should be the same after being recreated (right?). Or something.
-Miles
--
"Though they may have different meanings, the cries of 'Yeeeee-haw!' and
'Allahu akbar!' are, in spirit, not actually all that different."
Re: [Gnu-arch-users] archive-mirror not pushing cacherevs?, Robert Collins, 2004/01/11
Re: [Gnu-arch-users] archive-mirror not pushing cacherevs?, Johannes Berg, 2004/01/13