Re: newbie questions about git design and features (some wrt hg)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jakub Narebski <jnareb@...>
Cc: <mercurial@...>, <git@...>
Date: Wednesday, January 31, 2007 - 6:25 pm

On Wed, Jan 31, 2007 at 11:56:01AM +0100, Jakub Narebski wrote:

That's because it's unrelated.


Mercurial has write-side locks so there can only ever be one writer at
a time. There are no locks needed on the read side, so there can be
any number of readers, even while commits are happening.


We keep a simple transaction journal. As Mercurial revlogs are
append-only, rolling back a transaction just means truncating all
files in a transaction to their original length.


If a Mercurial transaction is interrupted and not rolled back, the
result is prune-able and fsck-visible crud. But this doesn't happen
much in practice.

The claim that's been made is that a) truncate is unsafe because Linux
has historically had problems in this area and b) git is safer because
it doesn't do this sort of thing. 

My response is a) those problems are overstated and Linux has never
had difficulty with the sorts of straightforward single writer
operations Mercurial uses and b) normal git usage involves regular
rewrites of data with packing operations that makes its exposure to
filesystem bugs equivalent or greater.

In either case, both provide strong integrity checks with recursive
SHA1 hashing, zlib CRCs, and GPG signatures (as well as distributed
"back-up"!) so this is largely a non-issue relative to traditional
systems.

-- 
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: newbie questions about git design and features (some wrt..., Matt Mackall, (Wed Jan 31, 6:25 pm)
Re: newbie questions about git design and features (some wrt..., Simon 'corecode' Schubert..., (Fri Feb 2, 9:51 am)
Re: newbie questions about git design and features (some wrt..., Simon 'corecode' Schubert..., (Thu Feb 1, 3:59 am)
Re: newbie questions about git design and features (some wrt..., Johannes Schindelin, (Thu Feb 1, 6:09 am)
Re: newbie questions about git design and features (some wrt..., Simon 'corecode' Schubert..., (Thu Feb 1, 6:15 am)
Re: newbie questions about git design and features (some wrt..., Johannes Schindelin, (Thu Feb 1, 6:49 am)