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

Re: [PATCH] pack-bitmap: gracefully handle missing BTMP chunks

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 15, 2024, 22:42 UTC
Message-ID
<Zh2tPdvhQgD4342C@nand.local>
In-Reply-To
<ZhzKeR9C4UVpEm29@tanuki>
On Mon, Apr 15, 2024 at 08:34:33AM +0200, Patrick Steinhardt wrote:
Show 6 quoted lines
> > Of course, that is still using a GIT_TEST_-variable, which is less than
> > ideal IMHO. The other alternative would be to store a MIDX file as a
> > test fixture in the tree (which we do in a couple of places). But with
> > the recent xz shenanigans, I'm not sure that's a great idea either ;-).
>
> I'm happy to convert this to use `GIT_TEST_MIDX_READ_BTMP` instead.
Thanks, I think that is definitely an improvement.
Show 21 quoted lines
> > The way I would structure this series is to first apply the portion of
> > the above patch *without* these lines:
> >
> > -	if (bitmap_is_midx(bitmap_git)) {
> > +	if (!bitmap_is_midx(bitmap_git) ||
> > +	    !bitmap_git->midx->chunk_bitmapped_packs)
> > +		multi_pack_reuse = 0;
> > +
> >
> > , so we're still able to reproduce the issue. Then, apply the remaining
> > portions (the above diff, the test, and the GIT_TEST_MIDX_WRITE_BTMP
> > stuff) to demonstrate that the issue is fixed via a separate commit.
> >
> > I'm happy to write that up, and equally happy to not do it ;-). Sorry
> > for the lengthy review, but thank you very much for spotting and fixing
> > this issue.
>
> I'd prefer to leave it as a single patch. Junio has expressed at times
> that he doesn't see much value in these splits only to demonstrate a
> broken test. An interested reader can easily revert the fix and see that
> the test would fail.

Yeah, to be clear, I wasn't suggesting adding a test_expect_failure here. I was suggesting instead that you do a refactoring that doesn't change the behavior in the first step, and then add the test plus the fix (after it is made easier to land by the first step) in the second step.

But I don't feel strongly about it whatsoever, so I think that the new version you have here is fine. I'll take a closer look at it right now...

Thanks, Taylor

Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 4 of 13 in “pack-bitmap: gracefully handle missing BTMP chunks”
  1. pack-bitmap: gracefully handle missing BTMP chunksPatrick Steinhardt, Apr 9, 2024
  2. Taylor BlauApr 10, 2024
  3. Patrick SteinhardtApr 15, 2024
  4. Taylor BlauApr 15, 2024
  5. pack-bitmap: gracefully handle missing BTMP chunksPatrick Steinhardt, Apr 15, 2024
  6. Patrick SteinhardtApr 15, 2024
  7. Junio C HamanoApr 15, 2024
  8. Taylor BlauApr 15, 2024
  9. Junio C HamanoApr 15, 2024
  10. Taylor BlauApr 15, 2024
  11. Patrick SteinhardtApr 16, 2024
  12. Jeff KingApr 16, 2024
  13. Patrick SteinhardtApr 16, 2024

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.