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

Re: [PATCH v2 0/4] pack-objects: fix a pair of MIDX bitmap-related races

From
Taylor Blau <me@ttaylorr.com>
Date
May 25, 2022, 00:16 UTC
Message-ID
<Yo11Yv9jgn5kDouL@nand.local>
In-Reply-To
<xmqqfskyfw68.fsf@gitster.g>
On Tue, May 24, 2022 at 02:38:39PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> Taylor Blau <me@ttaylorr.com> writes:
>
> >          verbatim reuse (c.f., `write_reused_pack_verbatim()`).
>
> Unlike "e.g." and "i.e.", I think these should all be "cf." (there
> are many others).
Oops. You learn something new everyday! ;-)
Show 25 quoted lines
> >     +    This patch handles the "preferred" pack (c.f., the section
> >     +    "multi-pack-index reverse indexes" in
> >     +    Documentation/technical/pack-format.txt) specially, since pack-objects
> >     +    depends on reusing exact chunks of that pack verbatim in
> >     +    reuse_partial_packfile_from_bitmap(). So if that pack cannot be loaded,
> >     +    the utility of a bitmap is significantly diminished.
>
> It explains why we care about the "preferred" pack, which is a nice
> clarification.  It hints that the other packs do not matter as much,
> and it is clearly stated that how they are handled is ...
>
> >     +    Similar to dc1daacdcc, we could technically just add this check in
> >     +    reuse_partial_packfile_from_bitmap(), since it's possible to use a MIDX
> >     +    .bitmap without needing to open any of its packs. But it's simpler to do
> >     +    the check as early as possible, covering all direct uses of the
> >     +    preferred pack. Note that doing this check early requires us to call
> >     +    prepare_midx_pack() early, too, so move the relevant part of that loop
> >     +    from load_reverse_index() into open_midx_bitmap_1().
> >     +
> >     +    Subsequent patches handle the non-preferred packs in a slightly
> >     +    different fashion.
>
> ... left for later steps.
>
> Excellent write-up.
Thanks very much!
Taylor
Previous: Junio C Hamano
Message 29 of 29 in “pack-objects: fix a pair of MIDX bitmap-related races”
  1. 0/2 pack-objects: fix a pair of MIDX bitmap-related racesTaylor Blau, May 13, 2022
  2. 1/2 pack-bitmap: check preferred pack validity when opening MIDX bitmapTaylor Blau, May 13, 2022
  3. Junio C HamanoMay 13, 2022
  4. Taylor BlauMay 13, 2022
  5. 2/2 builtin/pack-objects.c: ensure pack validity from MIDX bitmap objectsTaylor Blau, May 13, 2022
  6. Jonathan TanMay 13, 2022
  7. Taylor BlauMay 14, 2022
  8. Jonathan TanMay 16, 2022
  9. Taylor BlauMay 14, 2022
  10. Jonathan TanMay 16, 2022
  11. 0/4 pack-objects: fix a pair of MIDX bitmap-related racesTaylor Blau, May 24, 2022
  12. 1/4 pack-bitmap.c: check preferred pack validity when opening MIDX bitmapTaylor Blau, May 24, 2022
  13. Ævar Arnfjörð BjarmasonMay 24, 2022
  14. Taylor BlauMay 24, 2022
  15. Ævar Arnfjörð BjarmasonMay 24, 2022
  16. 2/4 builtin/pack-objects.c: avoid redundant NULL checkTaylor Blau, May 24, 2022
  17. Junio C HamanoMay 24, 2022
  18. Taylor BlauMay 25, 2022
  19. 3/4 builtin/pack-objects.c: ensure included `--stdin-packs` existTaylor Blau, May 24, 2022
  20. Ævar Arnfjörð BjarmasonMay 24, 2022
  21. Taylor BlauMay 24, 2022
  22. Ævar Arnfjörð BjarmasonMay 24, 2022
  23. Junio C HamanoMay 24, 2022
  24. Taylor BlauMay 25, 2022
  25. Victoria DyeMay 26, 2022
  26. Taylor BlauMay 26, 2022
  27. 4/4 builtin/pack-objects.c: ensure pack validity from MIDX bitmap objectsTaylor Blau, May 24, 2022
  28. Junio C HamanoMay 24, 2022
  29. Taylor BlauMay 25, 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.