git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] send-pack: never fetch when checking exclusions

From
Jeff King <peff@peff.net>
Date
Oct 11, 2019, 16:15 UTC
Message-ID
<20191011161504.GB19741@sigill.intra.peff.net>
In-Reply-To
<a87cf3ce-fbff-ef4e-941e-bd2da0bf182f@gmail.com>
On Fri, Oct 11, 2019 at 08:31:30AM -0400, Derrick Stolee wrote:
Show 12 quoted lines
> >> Ensure that these lazy fetches do not occur.
> > 
> > That makes sense. For similar reasons, should we be using
> > OBJECT_INFO_QUICK here? If the other side has a bunch of ref tips that
> > we don't have, we'll end up re-scanning the pack directory over and over
> > (which is _usually_ pretty quick, but can be slow if you have a lot of
> > packs locally). And it's OK if we racily miss out on an exclusion due to
> > somebody else repacking simultaneously.
> 
> That's a good idea. We can hint to the object store that we don't expect
> misses to be due to a concurrent repack, so we don't want to reprepare
> pack-files.

As a general rule (and why I'm raising this issue in reply to Jonathan's patch), I think most or all sites that want OBJECT_INFO_QUICK will want SKIP_FETCH_OBJECT as well, and vice versa. The reasoning is generally the same:

  - it's OK to racily have a false negative (we'll still be correct, but
    possibly a little less optimal)
  - it's expected and normal to be missing the object, so spending time
    double-checking the pack store wastes measurable time in real-world
    cases
-Peff
Previous: Derrick StoleeNext: Jonathan Tan
Message 6 of 9 in “send-pack: never fetch when checking exclusions”
  1. send-pack: never fetch when checking exclusionsJonathan Tan, Oct 7, 2019
  2. Junio C HamanoOct 8, 2019
  3. send-pack: never fetch when checking exclusionsJonathan Tan, Oct 8, 2019
  4. Jeff KingOct 11, 2019
  5. Derrick StoleeOct 11, 2019
  6. Jeff KingOct 11, 2019
  7. Jonathan TanOct 11, 2019
  8. Jeff KingOct 17, 2019
  9. Junio C HamanoOct 12, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.