git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: Brandon Williams <bmwill@google.com>
Cc: Stefan Beller <sbeller@google.com>,
	git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH 9/9] cache.h: allow sha1_object_info to handle arbitrary repositories
Date: Tue, 24 Apr 2018 11:55:36 -0700	[thread overview]
Message-ID: <20180424115536.54fe1a62541624b2dbe06619@google.com> (raw)
In-Reply-To: <20180424184233.GA90854@google.com>

On Tue, 24 Apr 2018 11:42:33 -0700
Brandon Williams <bmwill@google.com> wrote:

> On 04/24, Jonathan Tan wrote:
> > On Mon, 23 Apr 2018 16:43:27 -0700
> > Stefan Beller <sbeller@google.com> wrote:
> > 
> > > This involves also adapting sha1_object_info_extended and a some
> > > internal functions that are used to implement these. It all has to
> > > happen in one patch, because of a single recursive chain of calls visits
> > > all these functions.
> > 
> > In packfile.c, unpack_entry() invokes get_delta_base_cache_entry(),
> > which references a global (delta_base_cache). Does delta_base_cache need
> > to be moved to the repo object (or object store object) first, or is
> > this safe?
> 
> After looking at this, I think it should be safe for now since its a
> cache that requires a packed_git pointer to access (and those would be
> per repository).  We may want to move it in to the repository at some
> point though.

Thanks for the pointer. I see that a packed_git pointer is part of the
key to that hashmap, so this is indeed safe. (Probably worth discussing
this in the commit message.)

There is another global, delta_base_cached, but it just limits the total
size of the hashmap, so it's safe to use that too.

      reply	other threads:[~2018-04-24 18:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 23:43 [PATCH 0/9] object store: oid_object_info is the next contender Stefan Beller
2018-04-23 23:43 ` [PATCH 1/9] cache.h: add repository argument to oid_object_info_extended Stefan Beller
2018-04-23 23:43 ` [PATCH 2/9] cache.h: add repository argument to oid_object_info Stefan Beller
2018-04-24  0:31   ` brian m. carlson
2018-04-24 18:15   ` Jonathan Tan
2018-04-23 23:43 ` [PATCH 3/9] packfile: add repository argument to retry_bad_packed_offset Stefan Beller
2018-04-23 23:43 ` [PATCH 4/9] packfile: add repository argument to packed_to_object_type Stefan Beller
2018-04-23 23:43 ` [PATCH 5/9] packfile: add repository argument to packed_object_info Stefan Beller
2018-04-24 18:16   ` Jonathan Tan
2018-04-25  0:21     ` Junio C Hamano
2018-04-23 23:43 ` [PATCH 6/9] packfile: add repository argument to read_object Stefan Beller
2018-04-23 23:43 ` [PATCH 7/9] packfile: add repository argument to unpack_entry Stefan Beller
2018-04-23 23:43 ` [PATCH 8/9] packfile: add repository argument to cache_or_unpack_entry Stefan Beller
2018-04-23 23:43 ` [PATCH 9/9] cache.h: allow sha1_object_info to handle arbitrary repositories Stefan Beller
2018-04-24  0:34   ` brian m. carlson
2018-04-24  0:38     ` Stefan Beller
2018-04-24 18:23   ` Jonathan Tan
2018-04-24 18:42     ` Brandon Williams
2018-04-24 18:55       ` Jonathan Tan [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=20180424115536.54fe1a62541624b2dbe06619@google.com \
    --to=jonathantanmy@google.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=sbeller@google.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).