Re: [PATCH] reftable/stack: use geometric table compaction
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Mar 6, 2024, 12:37 UTC
- Message-ID
- <ZehjoXhH6deTJmSm@tanuki>
- In-Reply-To
- <pull.1683.git.1709669025722.gitgitgadget@gmail.com>
On Tue, Mar 05, 2024 at 08:03:45PM +0000, Justin Tobler via GitGitGadget wrote:
Show 10 quoted lines
> From: Justin Tobler <jltobler@gmail.com> > @@ -1305,7 +1287,7 @@ int reftable_stack_auto_compact(struct reftable_stack *st) > suggest_compaction_segment(sizes, st->merged->stack_len); > reftable_free(sizes); > if (segment_size(&seg) > 0) > - return stack_compact_range_stats(st, seg.start, seg.end - 1, > + return stack_compact_range_stats(st, seg.start, seg.end, > NULL); > > return 0;
One more thing: I think it would make sense to move the refactoring where you change whether the end segment index is inclusive or exclusive into a separate patch so that it's easier to reason about. Also, the fact that no tests would require changes would further stress the point that this is a mere refactoring without unintended side effects.
Patrick