Re: [PATCH 2/2] cache-tree: prefetch in partial clone read-tree
- From
- Jonathan 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/