summaryrefslogtreecommitdiff
path: root/t/unit-tests/t-reftable-stack.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-24 07:33:08 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-24 09:45:26 -0700
commit6241ce217046cc77d306bda06ad80ac1973b4932 (patch)
treeb990dfc713e5774704bff653ac537a6d801f3a01 /t/unit-tests/t-reftable-stack.c
parent80e7342ea8ecda48bdf034e77c32ac1c5d2bda85 (diff)
refs/reftable: reload locked stack when preparing transaction
When starting a reftable transaction we lock all stacks we are about to modify. While it may happen that the stack is out-of-date at this point in time we don't really care: transactional updates encode the expected state of a certain reference, so all that we really want to verify is that the _current_ value matches that expected state. Pass `REFTABLE_STACK_NEW_ADDITION_RELOAD` when locking the stack such that an out-of-date stack will be reloaded after having been locked. This change is safe because all verifications of the expected state happen after this step anyway. Add a testcase that verifies that many writers are now able to write to the stack concurrently without failures and with a deterministic end result. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-reftable-stack.c')
0 files changed, 0 insertions, 0 deletions