diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-09-24 07:33:05 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-24 09:45:25 -0700 |
commit | 80e7342ea8ecda48bdf034e77c32ac1c5d2bda85 (patch) | |
tree | cb13642079427147d3d58ecb323467cf3a9ed22b /compat/regex/regexec.c | |
parent | bc39b6a796eb707c34ffb759d50a75f96313f26c (diff) |
reftable/stack: allow locking of outdated stacks
In `reftable_stack_new_addition()` we first lock the stack and then
check whether it is still up-to-date. If it is not we return an error to
the caller indicating that the stack is outdated.
This is overly restrictive in our ref transaction interface though: we
lock the stack right before we start to verify the transaction, so we do
not really care whether it is outdated or not. What we really want is
that the stack is up-to-date after it has been locked so that we can
verify queued updates against its current state while we know that it is
locked for concurrent modification.
Introduce a new flag `REFTABLE_STACK_NEW_ADDITION_RELOAD` that alters
the behaviour of `reftable_stack_init_addition()` in this case: when we
notice that it is out-of-date we reload it instead of returning an error
to the caller.
This logic will be wired up in the reftable backend in the next commit.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/regex/regexec.c')
0 files changed, 0 insertions, 0 deletions