git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Tweed" <david.tweed@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Jim Meyering" <jim@meyering.net>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"git list" <git@vger.kernel.org>
Subject: Re: [PATCH] bundle, fast-import: detect write failure
Date: Fri, 11 Jan 2008 09:37:02 +0000	[thread overview]
Message-ID: <e1dab3980801110137o2440ccafxa4d3cc84630ce13b@mail.gmail.com> (raw)
In-Reply-To: <7vejco4xv5.fsf@gitster.siamese.dyndns.org>

On Jan 11, 2008 7:36 AM, Junio C Hamano <gitster@pobox.com> wrote:
> 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

  reply	other threads:[~2008-01-11  9:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10  8:54 [PATCH] bundle, fast-import: detect write failure Jim Meyering
2008-01-10  9:17 ` Pierre Habouzit
2008-01-10 12:05 ` Johannes Schindelin
2008-01-10 12:26   ` Jim Meyering
2008-01-10 12:37     ` Johannes Schindelin
2008-01-10 13:00       ` Jim Meyering
2008-01-10 16:25         ` Pierre Habouzit
2008-01-10 18:05           ` Jim Meyering
2008-01-10 18:18             ` Pierre Habouzit
2008-01-11  9:14           ` Jakub Narebski
2008-01-11  7:36         ` Junio C Hamano
2008-01-11  9:37           ` David Tweed [this message]
2008-01-11 11:39           ` Johannes Schindelin

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=e1dab3980801110137o2440ccafxa4d3cc84630ce13b@mail.gmail.com \
    --to=david.tweed@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jim@meyering.net \
    /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).