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> |
||
|---|---|---|
| .. | ||
| clar | ||
| .gitignore | ||
| clar-generate.awk | ||
| ctype.c | ||
| lib-oid.c | ||
| lib-oid.h | ||
| strvec.c | ||
| t-example-decorate.c | ||
| t-hash.c | ||
| t-hashmap.c | ||
| t-mem-pool.c | ||
| t-oid-array.c | ||
| t-oidmap.c | ||
| t-oidtree.c | ||
| t-prio-queue.c | ||
| t-reftable-basics.c | ||
| t-reftable-block.c | ||
| t-reftable-merged.c | ||
| t-reftable-pq.c | ||
| t-reftable-readwrite.c | ||
| t-reftable-record.c | ||
| t-reftable-stack.c | ||
| t-reftable-tree.c | ||
| t-strbuf.c | ||
| t-strcmp-offset.c | ||
| t-trailer.c | ||
| t-urlmatch-normalization.c | ||
| test-lib.c | ||
| test-lib.h | ||
| unit-test.c | ||
| unit-test.h | ||