git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Joey Hess <joey@kitenet.net>, git@vger.kernel.org
Subject: Re: [PATCH] drop support for "experimental" loose objects
Date: Wed, 27 Nov 2013 14:03:19 -0500	[thread overview]
Message-ID: <20131127190319.GA3540@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqeh61u0z9.fsf@gitster.dls.corp.google.com>

On Wed, Nov 27, 2013 at 10:57:14AM -0800, Junio C Hamano wrote:

> > Yes, I think it is a reasonable addition to the streaming API. However,
> > I do not think there are any callsites which would currently want it.
> > All of the current users of stream_blob_to_fd use read_sha1_file as
> > their alternative, and not parse_object. So we are not verifying the
> > sha1 in either case (we may want to change that, of course, but that is
> > a bigger decision than just trying to bring streaming and non-streaming
> > code-paths into parity).
> 
> True. I am not offhand sure if we want to make read_sha1_file() to
> rehash, but I agree that it is a question different from what we are
> asking in this discussion.

I'm torn on that. Having git verify everything all the time is kind of
cool. But it _does_ have a performance impact, and the vast majority of
the time nothing got corrupted since the last time we looked at the
object. It seems like periodically running "git fsck" is a smarter way
of doing periodic checks.

We already are careful when objects are coming into the repository, and
I think that is a sensible boundary (and I am increasingly of the
opinion that running with transfer.fsckobjects off is not a good idea).

The checks in parse_object seem hack-ish to me, because they catch some
random subset of the times we access objects (e.g., calling parse_object
on a commit sha1 will check, but calling parse_commit on an unparsed
commit struct will not). If anything, I'd suggest moving the checking
down to read_sha1_file, which would add it fairly consistently
everywhere, and then tying it to a config option (off for high
performance, on for slower-but-meticulous).

-Peff

      reply	other threads:[~2013-11-27 19:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20 20:33 corrupt object memory allocation error Joey Hess
2013-11-20 21:33 ` Jeff King
2013-11-20 22:28   ` Joey Hess
2013-11-21 11:41     ` [PATCH] drop support for "experimental" loose objects Jeff King
2013-11-21 11:48       ` Jeff King
2013-11-21 12:43         ` Duy Nguyen
2013-11-21 14:42           ` Keshav Kini
2013-11-21 22:41           ` Jeff King
2013-11-21 19:44         ` Junio C Hamano
2013-11-23  0:24         ` Jonathan Nieder
2013-11-23  0:30           ` Jeff King
2013-11-23  0:47             ` Jonathan Nieder
2013-11-21 16:04       ` Joey Hess
2013-11-21 20:19         ` Christian Couder
2013-11-22  9:58           ` Jeff King
2013-11-22 11:04             ` Christian Couder
2013-11-22 11:24               ` Jeff King
2013-11-22 14:23                 ` Christian Couder
2013-11-22 16:15                   ` Jeff King
2013-11-22 17:23             ` Junio C Hamano
2013-11-22  2:09         ` Jeff King
2013-11-22 17:28           ` Joey Hess
2013-11-24  8:44             ` Jeff King
2013-11-24  9:07               ` Jeff King
2013-11-25 18:35                 ` Junio C Hamano
2013-11-27  9:30                   ` Jeff King
2013-11-27 18:57                     ` Junio C Hamano
2013-11-27 19:03                       ` Jeff King [this message]

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=20131127190319.GA3540@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=joey@kitenet.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).