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

Re: [PATCH 2/2] promisor-remote: die upon failing fetch

From
Glen Choo <chooglen@google.com>
Date
Sep 28, 2022, 17:43 UTC
Message-ID
<kl6l8rm3mm2x.fsf@chooglen-macbookpro.roam.corp.google.com>
In-Reply-To
<7f6412eb8ce0c47a7645b89fab171a212353f8b2.1664316642.git.jonathantanmy@google.com>

No real comments on the code - I'm not familiar enough with it, but it seems really simple anyway.

Jonathan Tan <jonathantanmy@google.com> writes:
Show 6 quoted lines
> When this batch prefetch fails, these commands fall back to the
> sequential fetches. But at $DAYJOB we have noticed that this results in
> a bad user experience: a command would take unexpectedly long to finish
> if the batch prefetch would fail for some intermittent reason, but all
> subsequent fetches would work. It would be a better user experience for
> such a command would just fail.

I'm not certain that this fail-fast approach is always a better user experience:

- I could imagine that for a small-enough set of objects (say, a very
  restrictive set of sparse specifications), one-by-one fetching would be
  good enough.
- Even if one-by-one fetching isn't fast, I'd imagine that each
  individual fetch is more likely to succeed than a batch prefetch, and
  as a user, I would prefer to ^C an operation that takes longer than I
  expected than to have retry the repeatedly.

Here are some other arguments that you didn't mention, but I find more convincing:

- Running prefetch in a non-interactive process (e.g. running a job in
  CI) and the user would prefer to fail fast than to have the job run
  longer than expected, e.g. they could script retries manually
  (although, maybe we should do that ourselves).
- Fetching might be subject to a quota, which will be exhausted by
  one-by-one fetching.

As such, it _might_ make sense to make this behavior configurable, since we may sometimes want it and sometimes not.

Previous: Jonathan TanNext: Jonathan Tan
Message 6 of 15 in “Fail early when partial clone prefetch fails”
  1. 0/2 Fail early when partial clone prefetch failsJonathan Tan, Sep 27, 2022
  2. 1/2 promisor-remote: remove a return valueJonathan Tan, Sep 27, 2022
  3. Junio C HamanoSep 29, 2022
  4. Jonathan TanSep 30, 2022
  5. 2/2 promisor-remote: die upon failing fetchJonathan Tan, Sep 27, 2022
  6. Glen ChooSep 28, 2022
  7. Jonathan TanSep 30, 2022
  8. Junio C HamanoSep 29, 2022
  9. Junio C HamanoSep 29, 2022
  10. Jonathan TanSep 30, 2022
  11. Junio C HamanoSep 30, 2022
  12. 0/2 Fail early when partial clone prefetch failsJonathan Tan, Oct 4, 2022
  13. 1/2 promisor-remote: remove a return valueJonathan Tan, Oct 4, 2022
  14. 2/2 promisor-remote: die upon failing fetchJonathan Tan, Oct 4, 2022
  15. Junio C HamanoOct 5, 2022

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.