git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Sascha Silbe <sascha-ml-reply-to-2009-2@silbe.org>
Cc: git@vger.kernel.org
Subject: Re: crash proof / recovery from power loss
Date: Thu, 25 Jun 2009 06:11:52 -0700 (PDT)	[thread overview]
Message-ID: <m37hz0xxuq.fsf@localhost.localdomain> (raw)
In-Reply-To: <20090623210556.GB31015@twin.sascha.silbe.org>

Sascha Silbe <sascha-ml-devel-vcs-git@silbe.org> writes:

> I'm going to use git as a back end for the Sugar data store /
> Journal. [1]
>
> One thing I'm worried about is how it's going to behave if a crash
> (e.g. power loss - no corruption) occurs.
> What can happen in such a case? Is it always recoverable and if so, how?
> 
> 
> [1] http://wiki.sugarlabs.org/go/Version_support_for_datastore

In Git all operations are atomic.  

In most cases Git uses the following 'trick': it first
downloads/saves/creates data, and only then automatically update
information that it is available.  So crash would result in some
unreachanble objects, which would go away on prune.

In some cases Git uses locks to ensure atomicity.  I don't know what
happens with locks after a crash...

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2009-06-25 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 21:05 crash proof / recovery from power loss Sascha Silbe
2009-06-25 13:11 ` Jakub Narebski [this message]
2009-06-25 13:31 ` Martin Langhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m37hz0xxuq.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sascha-ml-reply-to-2009-2@silbe.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).