[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rename atomicity
From: |
Larry Jones |
Subject: |
Re: Rename atomicity |
Date: |
Wed, 11 Apr 2001 10:54:17 -0400 (EDT) |
Derek R. Price writes:
>
> What of the case where a file is being written while a read-only CVS attempts
> to read it. Providing RCS doesn't consistently break, and I'm far from sure
> it will, the resulting partial file in the sandbox will have valid metadata.
> If the file was touched in the sandbox, a later commit could check in
> garbage.
That can't happen. When rewriting foo,v, both CVS and RCS actually
write a new file named ,foo, and only rename it to foo,v once it's been
completely written successfully. If the rename happens while a reader
has the file open, it will continue to read the original file (which
will be deleted once the reader closes it).
-Larry Jones
There's a connection here, I just know it. -- Calvin