git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] pack-revindex: drop hash table
Date: Mon, 21 Dec 2015 02:08:28 -0500	[thread overview]
Message-ID: <20151221070828.GA3895@sigill.intra.peff.net> (raw)
In-Reply-To: <CAPig+cTD+qknnZ3rH7skcTxZA16AL0BPbLT5ZaJdwwu_d-i=Jw@mail.gmail.com>

On Mon, Dec 21, 2015 at 02:06:59AM -0500, Eric Sunshine wrote:

> On Mon, Dec 21, 2015 at 1:19 AM, Jeff King <peff@peff.net> wrote:
> > The main entry point to the pack-revindex code is
> > find_pack_revindex(). This calls revindex_for_pack(), which
> > lazily computes and caches the revindex for the pack.
> >
> > We store the cache in a very simple hash table. It's created
> > by init_pack_revindex(), which inserts an entry for every
> > packfile we know about, and we never grow or shrink the
> > hash. If we ever need the revindex for a pack that isn't in
> > the hash, we die() with an internal error.
> >
> > This can lead to a race, because we may load more packs
> > after having called init_pack_revindex(). For example,
> > imagine we have one process which needs to look at the
> > revindex for a variety of objects (e.g., cat-file's
> > "%(objectsize:disk)" format).  Simultaneously, git-gc is
> > running, which is doing a `git repack -ad` is running. We
> > might hit a sequence like:
> 
> Probably want to drop one of the "is running"s...

Whoops. Not matter how many times I read it over...

It should be:

  Simultaneously, git-gc is running, which is doing a `git repack -ad`.

-Peff

      reply	other threads:[~2015-12-21  7:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21  6:19 [PATCH 1/2] pack-revindex: drop hash table Jeff King
2015-12-21  6:20 ` [PATCH 2/2] pack-revindex: store entries directly in packed_git Jeff King
2015-12-21  7:06 ` [PATCH 1/2] pack-revindex: drop hash table Eric Sunshine
2015-12-21  7:08   ` 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

  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=20151221070828.GA3895@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /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).