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

Re: [PATCH] fetch-pack: write fetched refs to .promisor

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Sep 5, 2019, 18:39 UTC
Message-ID
<20190905183926.137490-1-jonathantanmy@google.com>
In-Reply-To
<20190905070153.GE21450@sigill.intra.peff.net>
> I'm not really opposed to what you're doing here, but I did recently
> think of another possible use for .promisor files. So it seems like a
> good time to bring it up, since presumably we'd have to choose one or
> the other.
Thanks for bringing it up - yes, we should discuss this.
Show 11 quoted lines
> I noticed when playing with partial clones that the client may sometimes
> pause for a while, chewing CPU. The culprit is is_promisor_object(),
> which generates the list of known promisor objects by opening every
> object we _do_ have to find out which ones they mention.
> 
> I know one of the original design features of the promisor pack was that
> the client would _not_ keep a list of all of the objects it didn't have.
> But I wonder if it would make sense to keep a cache of these "cut
> points" in the partial clone. That's potentially smaller than the
> complete set of objects (especially for tree-based partial cloning), and
> it seems clear we're willing to store it in memory anyway.

Well, before the current design was implemented, I had a design that had such a list of missing objects. :-) I couldn't find a writeup, but here is some preliminary code [1]. In that code, as far as I can tell, the server gives us the list directly during fetch and the client merges it with a repository-wide file called $GIT_DIR/objects/promisedblob, but we don't have to follow the design (we could lazily generate the file, have per-packfile promisedblob files, etc.).

[1] https://public-inbox.org/git/cover.1499800530.git.jonathantanmy@google.com/
> And if we do that, would the .promisor file for a pack be a good place
> to store it?

After looking at [1], it might be better in another place. If we want to preserve fast fetches, we still need another file to indicate that the pack is a promisor, so ".promisor" seems good for that. The presence or absence of the cutoff points is a separate issue and could go into a separate file, and it might be worth putting all cutoff points into a single per-repository file too.

Previous: Jeff KingNext: Jeff King
Message 7 of 12 in “fetch-pack: write fetched refs to .promisor”
  1. fetch-pack: write fetched refs to .promisorJonathan Tan, Aug 26, 2019
  2. Junio C HamanoAug 27, 2019
  3. Jonathan TanAug 27, 2019
  4. Jeff KingSep 5, 2019
  5. Junio C HamanoSep 5, 2019
  6. Jeff KingSep 5, 2019
  7. Jonathan TanSep 5, 2019
  8. Jeff KingOct 2, 2019
  9. Josh SteadmonOct 14, 2019
  10. Jonathan TanOct 14, 2019
  11. fetch-pack: write fetched refs to .promisorJonathan Tan, Oct 15, 2019
  12. Josh SteadmonOct 15, 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.