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

Re: [PATCH v2 3/8] checkout-index: add parallel checkout support

From
Christian Couder <christian.couder@gmail.com>
Date
May 1, 2021, 17:08 UTC
Message-ID
<CAP8UFD1X6ZZXCMfEDfJDjr0mB2XwQAvuhTAT0beJka-QR2k6nQ@mail.gmail.com>
In-Reply-To
<0fe1a5fabc8cb5f7c2421afaefae030d399d28ed.1619818517.git.matheus.bernardino@usp.br>

On Fri, Apr 30, 2021 at 11:40 PM Matheus Tavares <matheus.bernardino@usp.br> wrote:

>
> Note: previously, `checkout_all()` would not return on errors, but
s/Note: previously/Previously/
Show 9 quoted lines
> instead call `exit()` with a non-zero code. However, it only did that
> after calling `checkout_entry()` for all index entries, thus not
> stopping on the first error, but attempting to write the maximum number
> of entries possible. In order to maintain this behavior we now propagate
> `checkout_all()`s error status to `cmd_checkout_index()`, so that it can
> call `run_parallel_checkout()` and attempt to write the queued entries
> before exiting with the error code.
>
> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Show 9 quoted lines
> @@ -142,11 +143,7 @@ static void checkout_all(const char *prefix, int prefix_length)
>         }
>         if (last_ce && to_tempfile)
>                 write_tempfile_record(last_ce->name, prefix);
> -       if (errs)
> -               /* we have already done our error reporting.
> -                * exit with the same code as die().
> -                */
> -               exit(128);

So when there were errors in checkout_all(), we used to exit() with error code 128 (same as die())...

Show 13 quoted lines
> @@ -275,12 +277,16 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
>                 strbuf_release(&buf);
>         }
>
> +       if (all)
> +               err |= checkout_all(prefix, prefix_length);
> +
> +       if (pc_workers > 1)
> +               err |= run_parallel_checkout(&state, pc_workers, pc_threshold,
> +                                            NULL, NULL);
> +
>         if (err)
>                 return 1;

...but now it looks like we will exit with error code 1. I see that you already answered this comment in the previous round of review, but you didn't add the explanations to the commit message.

Previous: Matheus TavaresNext: Matheus Tavares Bernardino
Message 25 of 50 in “Parallel Checkout (part 3)”
  1. 0/7 Parallel Checkout (part 3)Matheus Tavares, Apr 22, 2021
  2. 1/7 make_transient_cache_entry(): optionally alloc from mem_poolMatheus Tavares, Apr 22, 2021
  3. 2/7 builtin/checkout.c: complete parallel checkout supportMatheus Tavares, Apr 22, 2021
  4. Derrick StoleeApr 23, 2021
  5. Matheus Tavares BernardinoApr 26, 2021
  6. 3/7 checkout-index: add parallel checkout supportMatheus Tavares, Apr 22, 2021
  7. Derrick StoleeApr 23, 2021
  8. Matheus Tavares BernardinoApr 26, 2021
  9. 4/7 parallel-checkout: add tests for basic operationsMatheus Tavares, Apr 22, 2021
  10. Derrick StoleeApr 23, 2021
  11. Matheus Tavares BernardinoApr 27, 2021
  12. 5/7 parallel-checkout: add tests related to path collisionsMatheus Tavares, Apr 22, 2021
  13. 6/7 parallel-checkout: add tests related to .gitattributesMatheus Tavares, Apr 22, 2021
  14. Derrick StoleeApr 23, 2021
  15. 7/7 ci: run test round with parallel-checkout enabledMatheus Tavares, Apr 22, 2021
  16. Derrick StoleeApr 23, 2021
  17. 0/8 Parallel Checkout (part 3)Matheus Tavares, Apr 30, 2021
  18. 1/8 make_transient_cache_entry(): optionally alloc from mem_poolMatheus Tavares, Apr 30, 2021
  19. Christian CouderMay 1, 2021
  20. Matheus Tavares BernardinoMay 3, 2021
  21. 2/8 builtin/checkout.c: complete parallel checkout supportMatheus Tavares, Apr 30, 2021
  22. Christian CouderMay 1, 2021
  23. Matheus Tavares BernardinoMay 3, 2021
  24. 3/8 checkout-index: add parallel checkout supportMatheus Tavares, Apr 30, 2021
  25. Christian CouderMay 1, 2021
  26. Matheus Tavares BernardinoMay 3, 2021
  27. 4/8 parallel-checkout: add tests for basic operationsMatheus Tavares, Apr 30, 2021
  28. 5/8 parallel-checkout: add tests related to path collisionsMatheus Tavares, Apr 30, 2021
  29. Torsten BögershausenMay 2, 2021
  30. Matheus Tavares BernardinoMay 3, 2021
  31. 6/8 t0028: extract encoding helpers to lib-encoding.shMatheus Tavares, Apr 30, 2021
  32. 7/8 parallel-checkout: add tests related to .gitattributesMatheus Tavares, Apr 30, 2021
  33. 8/8 ci: run test round with parallel-checkout enabledMatheus Tavares, Apr 30, 2021
  34. Torsten BögershausenMay 2, 2021
  35. Matheus Tavares BernardinoMay 3, 2021
  36. 0/8 Parallel Checkout (part 3)Matheus Tavares, May 4, 2021
  37. 1/8 make_transient_cache_entry(): optionally alloc from mem_poolMatheus Tavares, May 4, 2021
  38. 2/8 builtin/checkout.c: complete parallel checkout supportMatheus Tavares, May 4, 2021
  39. Derrick StoleeMay 5, 2021
  40. 3/8 checkout-index: add parallel checkout supportMatheus Tavares, May 4, 2021
  41. 4/8 parallel-checkout: add tests for basic operationsMatheus Tavares, May 4, 2021
  42. AIX failures on parallel checkout (new in v2.32.0-rc*)Ævar Arnfjörð Bjarmason, May 26, 2021
  43. Matheus Tavares BernardinoMay 26, 2021
  44. Junio C HamanoMay 26, 2021
  45. 5/8 parallel-checkout: add tests related to path collisionsMatheus Tavares, May 4, 2021
  46. 6/8 t0028: extract encoding helpers to lib-encoding.shMatheus Tavares, May 4, 2021
  47. 7/8 parallel-checkout: add tests related to .gitattributesMatheus Tavares, May 4, 2021
  48. 8/8 ci: run test round with parallel-checkout enabledMatheus Tavares, May 4, 2021
  49. Derrick StoleeMay 5, 2021
  50. Junio C HamanoMay 6, 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.