[Yum] A couple of problems and RFE for Yum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 21, 2003 at 03:02:50PM -0700, Garrick Staples wrote:
> On Tue, Oct 21, 2003 at 04:19:08PM -0400, Rick Thomas alleged:
> > seth vidal wrote:
> > > 
> > > > Another alternative is:
> > > >
> > > > 1) write to .newheaders
> > > > 2) HARD LINK headers to .oldheaders
> > > > 3) rename .newheaders to headers
> > > >
> > > > That's efficient, but requires hard links :)
> > > 
> > > which not all filesystems have, right.
> > 
> > Right.  Not all filesystems have hard links.  However, some do -- and in
> > that case, it would be very nice to provide *true* atomicity when
> > possible and cheap to do so.  Would a bugzilla on this be useful?
> 
> Unfortunately you can't hardlink directories.
> 
> This is a general Unix rule that has been in my head for ages.  I just
> actually tried it on Solaris and Linux, and found it to be true.
> Perhaps other OSes allow this.

Right.  I misunderstood exactly what we were talking about earlier.  I
thought we were talking about single files.  The current method is
indeed as close to atomic as you can get for a directory.  You can't
unlink a non-empty directory (not without doing serious damage anyway)
so you can't rename .newheaders to headers until you've renamed
headers to .oldheaders.

There will be a VERY brief instant where 'headers' doesn't exist.
Before that time, you get the old stuff.  After that time, you get the
newstuff.  If you manage to hit that time exactly, then your client
will retry, at which point everything will work fine.  Tada.

The way it works now is great.

					-Michael

P.S.  That will be $5, Seth.
-- 
  Michael Stenner                       Office Phone: 919-660-2513
  Duke University, Dept. of Physics       mstenner@xxxxxxxxxxxx
  Box 90305, Durham N.C. 27708-0305

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux