Re: [PATCH 14/16] repack: implement incremental MIDX repacking
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Apr 21, 2026, 19:40 UTC
- Message-ID
- <aefSy92LC3Uo3hNW@nand.local>
- In-Reply-To
- <CABPp-BHuj8UKG3Mh9opniHMrgNkKiWLKv7pqVAex3PeAX1+Ydw@mail.gmail.com>
On Thu, Apr 16, 2026 at 03:53:10PM -0700, Elijah Newren wrote:
Show 10 quoted lines
> Although, midx_split_factor is defined here, it isn't explicitly > initialized anywhere. As far as I can tell, it's only initialized > through a designated initializer in builtin/repack.c with > midx_split_factor not appearing as one of the designated fields and > thus getting a value of 0. That would result in a divide by > zero...although, as you noted in the commit message, this code isn't > yet active. > > Still, would it make sense to initialize opts.midx_split_factor in > builtin/repack.c to something non-zero as part of this patch?
Good point. I had avoided initializing it because this code is all dead as of this point in the series, and I didn't want to touch the repack builtin until we actually wire it all up.
But I think the point you raise here is very fair, so I introduced the constants in this patch and used them in the initializer, then adjust them in the subsequent patch to use the given values instead of the defaults.
Thanks, Taylor