Repository format comparison
Matt Mackall
mpm at selenic.com
Wed Nov 15 15:01:18 CST 2006
On Wed, Nov 15, 2006 at 08:59:06PM +0100, Giuseppe Bilotta wrote:
> Hello, on another mailing list I just found a link to this blog
> article
>
> http://keithp.com/blog/Repository_Formats_Matter.html
>
> (from a month ago) which also has a brief mentioning of Mercurial:
>
> """
> Mercurial uses a truncated forward delta scheme where file revisions
> are appended to the repository file, as a string of deltas with
> occasional complete copies of the file (to provide a time bound on
> operations). This suffers from two possible problems???the first is
> fairly obvious where corrupted writes of new revisions can affect old
> revisions of the file.
Mercurial files are append-only. New revisions (corrupted or not), do
not affect old revisions. If a hardware or operating system bug causes
a write to scribble over the wrong part of a file, all bets are off of
course. But such bugs could just as easily scribble over any other
part of the disk, so I think this is no more of an issue than it is
for any other possible system.
> The second is more subtle -- system failure during commit will leave
> the file contents half written. Mercurial has recovery techniques to
> detect this, but they involve truncating existing files, a piece of
> the Linux kernel which has constantly suffered from race conditions
> and other adventures.
Constantly is rather overstating it. There have been a few interesting
truncate races found and sorting out one of them was a process that
took several months a few years back. But none are the sort that
affect the average application and none are the sort that would
manifest with the very straightforward usage of truncate in Mercurial.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list