From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Shawn Pearce <spearce@spearce.org>,
Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
git <git@vger.kernel.org>, Colby Ranger <cranger@google.com>,
David Barr <barr@github.com>
Subject: Re: Using bitmaps to accelerate fetch and clone
Date: Thu, 27 Sep 2012 17:36:02 -0400 [thread overview]
Message-ID: <20120927213602.GA12512@sigill.intra.peff.net> (raw)
In-Reply-To: <7vfw63p2wi.fsf@alter.siamese.dyndns.org>
On Thu, Sep 27, 2012 at 02:33:01PM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > So yeah, we would want to put the pack trailer sha1 into the
> > supplementary index file, and check that it matches when we open it.
> > It's a slight annoyance, but it's O(1).
>
> Yes. If I am not mistaken, that is exactly how an .idx file makes
> sure that it describes the matching .pack file (it has packfile
> checksum in its trailer). Otherwise you can repack the same set of
> objects into a new .pack file and make existing .idx very confused.
Yeah. In theory you wouldn't name the new packfile into place without
also generating a new index for it. But even if you do it right, there's
a race condition, and checking the trailer sha1 at least lets us know
that they don't match (I assume we just reject the index, then; I guess
this can result in an operation failing, but in practice it doesn't
really happen, as we don't bother packing unless there are actually new
objects).
-Peff
next prev parent reply other threads:[~2012-09-27 21:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 0:47 Using bitmaps to accelerate fetch and clone Shawn Pearce
2012-09-27 12:17 ` Nguyen Thai Ngoc Duy
2012-09-27 14:33 ` Shawn Pearce
2012-09-28 1:37 ` Nguyen Thai Ngoc Duy
2012-09-27 17:20 ` Jeff King
2012-09-27 17:35 ` Shawn Pearce
2012-09-27 18:22 ` Jeff King
2012-09-27 18:36 ` Shawn Pearce
2012-09-27 18:52 ` Jeff King
2012-09-27 20:18 ` Jeff King
2012-09-27 21:33 ` Junio C Hamano
2012-09-27 21:36 ` Jeff King [this message]
2012-09-27 19:47 ` David Michael Barr
2012-09-28 1:38 ` Nguyen Thai Ngoc Duy
2012-09-28 12:00 ` Nguyen Thai Ngoc Duy
2012-10-01 1:07 ` Shawn Pearce
2012-10-01 1:59 ` Nguyen Thai Ngoc Duy
2012-10-01 2:26 ` Shawn Pearce
2012-10-01 12:48 ` Nguyen Thai Ngoc Duy
2012-10-02 15:00 ` Shawn Pearce
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120927213602.GA12512@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=barr@github.com \
--cc=cranger@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=spearce@spearce.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).