Re: [PATCH v2 2/2] reftable: fix quadratic behavior in the presence of tombstones
- From
Kristofer Karlsson <krka@spotify.com>
- Date
- Jul 9, 2026, 14:48 UTC
- Message-ID
- <CAL71e4PrtZwB8TMg3eBj=LzC7ik+C8yxLYEEEP7SDgMPiWSs0Q@mail.gmail.com>
- In-Reply-To
- <ak-n6K4heV2kHviZ@pks.im>
On Thu, 9 Jul 2026 at 15:53, Patrick Steinhardt <ps@pks.im> wrote:
Show 19 quoted lines
> > On Thu, Jul 09, 2026 at 12:08:31PM +0000, Kristofer Karlsson via GitGitGadget wrote: > > diff --git a/reftable/stack.c b/reftable/stack.c > > index ab12926708..fd7d8f3f1e 100644 > > --- a/reftable/stack.c > > +++ b/reftable/stack.c > > @@ -337,7 +337,6 @@ static int reftable_stack_reload_once(struct reftable_stack *st, > > /* Update the stack to point to the new tables. */ > > if (st->merged) > > reftable_merged_table_free(st->merged); > > - new_merged->suppress_deletions = 1; > > st->merged = new_merged; > > > > if (st->tables) > > Okay, we still retain the field after this patch. But the question is: > how would libgit2 now set it? I think we should rather extend the > `struct reftable_stack_options` so that the caller can control whether > or not to suppress deletions at stack creation time.
You are right, I (still) missed the compatibility problem here.
I started thinking about a way to make it fully backwards compatible, but then I looked at the libgit2 repo and realized it will need updating anyway since it predates the reftable_stack_options split.
I will add suppress_deletions to reftable_stack_options as you suggested.
Thanks, Kristofer