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

Re: [PATCH] bundle, fast-import: detect write failure

From
DTDavid Tweed <david.tweed@gmail.com>
Date
Jan 11, 2008, 09:37 UTC
Message-ID
<e1dab3980801110137o2440ccafxa4d3cc84630ce13b@mail.gmail.com>
In-Reply-To
<7vejco4xv5.fsf@gitster.siamese.dyndns.org>
On Jan 11, 2008 7:36 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> In this case, a failure while closing that small .keep file is
> highly unlikely, and if we ever mange to trigger such a highly
> unlikely failure, I think we would rather want to *know* about
> it, as it is likely there is something more seriously wrong
> going on.

On a slightly related note: I've got a patch that handles the issue that I reported a couple of months back that tmp pack/index objects where a write fails partway through are not deleted by any git processing, ie, when for example during git gc --prune we get

fatal: sha1 file '/media/usbdiskc/v.git/objects/tmp_pack_QCYYAi' write error (No space left on device) error: failed to run repack

but the tmp_pack_* isn't deleted. I put my patch on the back burner when Junio declared a moratorium on new behaviours until after 1.5.4 gets released, but will post once things open up again.

As it relates to this discussion: one of the awkward things is that the die stuff doesn't leave any programatic indication (ie, not just a message to stderr) that a file is malformed due to a writing failure. Per Nicolas Pitre's suggestion to delete failed tmp_ files during a "git gc --prune", I just delete ALL tmp_ files at that time. This approach seems a bit risky -- can something like a git-svn fetch which generated tmp_ files by a different route be going on at the same time as a git gc? -- but I couldn't think of another way to do it.

-- 
cheers, dave tweed__________________________
david.tweed@gmail.com
Rm 124, School of Systems Engineering, University of Reading.
"we had no idea that when we added templates we were adding a Turing-
complete compile-time language." -- C++ standardisation committee
Previous: Junio C HamanoNext: Johannes Schindelin
Message 12 of 13 in “bundle, fast-import: detect write failure”
  1. bundle, fast-import: detect write failureJim Meyering, Jan 10, 2008
  2. Pierre HabouzitJan 10, 2008
  3. Johannes SchindelinJan 10, 2008
  4. Jim MeyeringJan 10, 2008
  5. Johannes SchindelinJan 10, 2008
  6. Jim MeyeringJan 10, 2008
  7. Pierre HabouzitJan 10, 2008
  8. Jim MeyeringJan 10, 2008
  9. Pierre HabouzitJan 10, 2008
  10. Jakub NarebskiJan 11, 2008
  11. Junio C HamanoJan 11, 2008
  12. David TweedJan 11, 2008
  13. Johannes SchindelinJan 11, 2008

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.