git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: repo consistency under crashes and power failures?

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jul 16, 2013, 06:17 UTC
Message-ID
<51E4E570.1060403@viscovery.net>
In-Reply-To
<rmiy597iujc.fsf@fnord.ir.bbn.com>
Am 7/15/2013 19:48, schrieb Greg Troxel:
Show 5 quoted lines
> Clearly there is the possibility of creating a corrupt repository when
> receiving objects and updating refs, if a crash or power failure causes
> data not to get written to disk but that data is pointed to.  Journaling
> mitigates this, but I'd argue that programs should function safely with
> only the guarantees from POSIX.

Even under POSIX, "guarantees" and "crash/power failure" do not mesh well. This has been under dispute recently, for example:

http://thread.gmane.org/gmane.comp.standards.posix.austin.general/7456/focus=7487

The best we can achieve with POSIX alone is "to make bad consequences less likely".

Jonathan already mentioned the knob that allows you to trade performance for more safety.

-- Hannes
Previous: Jonathan NiederNext: Jeff King
Message 3 of 4 in “repo consistency under crashes and power failures?”
  1. Greg TroxelJul 15, 2013
  2. Jonathan NiederJul 15, 2013
  3. Johannes SixtJul 16, 2013
  4. Jeff KingJul 27, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.