Re: [PATCH 0/6] midx: permit changing the preferred pack when reusing the MIDX
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- Aug 22, 2022, 17:04 UTC
- Message-ID
- <6c146fa9-48da-5f74-c91a-29c54e1da6ce@github.com>
- In-Reply-To
- <cover.1660944574.git.me@ttaylorr.com>
On 8/19/2022 5:30 PM, Taylor Blau wrote:
Show 20 quoted lines
> This series resolves a bug that was reported[1] by Johannes, and > investigated by him, Abhradeep, and Stolee in that same sub-thread. > > The crux of the issue is that a MIDX bitmap can enter a corrupt state > when changing the preferred pack from its value in an existing MIDX in > certain circumstances as described in the first and final patches. > > This series is structured as follows: > > - The first patch of this series adds a test which demonstrates the > problem. (This is an improvement from the debugging in [1], where we > only noticed the problem racily in an existing test, and only in > SHA-256 mode). > > - The next small handful of patches refactor midx.c's > `get_sorted_entries()` function to make fixing this bug more > straightforward. > > - The final patch resolves the bug and updates the test to no longer > expect failure.
Thanks for putting this together. Definitely not an easy bug to find and fix.
I mostly have nitpicks, but the overall structure is sound.
Thanks, -Stolee