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

Re: [PATCH 2/2] cache-tree: prefetch in partial clone read-tree

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Jul 23, 2021, 18:55 UTC
Message-ID
<20210723185548.1784350-1-jonathantanmy@google.com>
In-Reply-To
<f4881b7455b9d33c8a53a91eda7fbdfc5d11382c.1627066238.git.jonathantanmy@google.com>
Show 12 quoted lines
> "git read-tree" checks the existence of the blobs referenced by the
> given tree, but does not bulk prefetch them. Add a bulk prefetch.
> 
> The lack of prefetch here was noticed at $DAYJOB during a merge
> involving some specific commits, but I couldn't find a minimal merge
> that didn't also trigger the prefetch in check_updates() in
> unpack-trees.c (and in all these cases, the lack of prefetch in
> cache-tree.c didn't matter because all the relevant blobs would have
> already been prefetched by then). This is why I used read-tree here to
> exercise this code path.
> 
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>

Forgot to mention: the $DAYJOB case is the same case as in [1]. In [1] I noticed that the object wasn't actually being used, so I disabled the object existence check. But that's probably the wrong approach - if the caller really didn't want the object's existence to be checked, they could have used WRITE_TREE_MISSING_OK when calling cache_tree_update().

[1] https://lore.kernel.org/git/cover.1627066238.git.jonathantanmy@google.com/
Previous: Jonathan TanNext: Junio C Hamano
Message 5 of 8 in “Another partial clone prefetch”
  1. 0/2 Another partial clone prefetchJonathan Tan, Jul 23, 2021
  2. 1/2 unpack-trees: refactor prefetching codeJonathan Tan, Jul 23, 2021
  3. Elijah NewrenJul 23, 2021
  4. 2/2 cache-tree: prefetch in partial clone read-treeJonathan Tan, Jul 23, 2021
  5. Jonathan TanJul 23, 2021
  6. Junio C HamanoJul 23, 2021
  7. Elijah NewrenJul 23, 2021
  8. Derrick StoleeJul 26, 2021

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.