From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Derrick Stolee <stolee@gmail.com>, git@vger.kernel.org
Subject: tb/midx-bitmap-corruption-fix (was: Re: What's cooking in git.git (Jan 2022, #03; Thu, 13))
Date: Fri, 14 Jan 2022 14:39:14 -0500 [thread overview]
Message-ID: <YeHRYkl2RaQbrtmx@nand.local> (raw)
In-Reply-To: <xmqq35lrf8g4.fsf@gitster.g>
On Thu, Jan 13, 2022 at 04:48:59PM -0800, Junio C Hamano wrote:
> * tb/midx-bitmap-corruption-fix (2022-01-04) 9 commits
> - pack-bitmap.c: gracefully fallback after opening pack/MIDX
> - midx: read `RIDX` chunk when present
> - t/lib-bitmap.sh: parameterize tests over reverse index source
> - t5326: move tests to t/lib-bitmap.sh
> - t5326: extract `test_rev_exists`
> - t5326: drop unnecessary setup
> - pack-revindex.c: instrument loading on-disk reverse index
> - midx.c: make changing the preferred pack safe
> - t5326: demonstrate bitmap corruption after permutation
>
> A bug that made multi-pack bitmap and the object order out-of-sync
> (hence the .midx data gets corrupted) has been fixed.
>
> Waiting for a hopefully final review.
> cf. <Ydceeo33Yt4N%2FbrN@nand.local>
> source: <cover.1641320129.git.me@ttaylorr.com>
I would really like to get this into 2.35 since it's fixing an important
source of repository corruption, but I think it should have a careful
round of review before merging. And it is pretty late into the cycle
anyway, so we may be too late to merge the whole thing.
But the first two patches:
- midx.c: make changing the preferred pack safe
- t5326: demonstrate bitmap corruption after permutation
could be applied as-is and the rest of the series left for later, which
should be a safer approach (and would be sufficient to resolve the bug
at the expense of some redundant bytes on disk[1]).
I think Stolee is probably the most familiar with this topic, but he is
off currently and I'm not sure whether or not he'll be back with enough
time to get this merged before 2.35.
On the other hand, the bug is pretty difficult to trigger, is affecting
a very new feature, shouldn't ever cause permanent damage, and can be
recovered from fairly easily (by dropping existing bitmaps). So perhaps
it's OK to let it sit out for another release like this...
Thanks,
Taylor
[1]: More or less storing the contents of the multi-pack-index-$HASH.rev
file twice: once in the .rev file itself, and again as an optional
write-only chunk in the MIDX.
next prev parent reply other threads:[~2022-01-14 19:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 0:48 What's cooking in git.git (Jan 2022, #03; Thu, 13) Junio C Hamano
2022-01-14 4:18 ` Junio C Hamano
2022-01-14 16:27 ` Elijah Newren
2022-01-14 19:47 ` Junio C Hamano
2022-01-14 21:49 ` Elijah Newren
2022-01-14 22:03 ` Junio C Hamano
2022-01-14 22:18 ` Junio C Hamano
2022-01-14 18:12 ` Ævar Arnfjörð Bjarmason
2022-01-17 7:18 ` Patrick Steinhardt
2022-01-14 15:44 ` Mistakes in the stalled category? (Was: Re: What's cooking in git.git (Jan 2022, #03; Thu, 13)) Elijah Newren
2022-01-14 23:32 ` Mistakes in the stalled category? Junio C Hamano
2022-01-14 23:49 ` Junio C Hamano
2022-01-15 19:38 ` Junio C Hamano
2022-01-18 16:11 ` Derrick Stolee
2022-01-14 15:54 ` en/present-despite-skipped & en/remerge-diff (Was: Re: What's cooking in git.git (Jan 2022, #03; Thu, 13)) Elijah Newren
2022-01-14 19:39 ` Taylor Blau [this message]
2022-01-15 16:45 ` What's cooking in git.git (Jan 2022, #03; Thu, 13) David Aguilar
2022-01-15 19:15 ` Junio C Hamano
2022-01-16 2:15 ` David Aguilar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YeHRYkl2RaQbrtmx@nand.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.