git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] reftable: graceful concurrent writes
@ 2024-09-17 13:43 Patrick Steinhardt
  2024-09-17 13:43 ` [PATCH 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
                   ` (6 more replies)
  0 siblings, 7 replies; 42+ messages in thread
From: Patrick Steinhardt @ 2024-09-17 13:43 UTC (permalink / raw)
  To: git

Hi,

the reftable backend cannot properly handle concurrent writes due to two
reasons:

  - It will bail out immediately when it sees a locked "tables.list"
    file. This is being addressed by introducing a configurable locking
    timeout, similar to how we have it for both loose and packed refs.

  - It will bail out when it notices that its stack is out-of-date after
    having locked the "tables.list" file. This is addressed by reloading
    the stack as requested after locking it, which is fine because our
    transactional API would verify queued ref updates against their
    expected state after the lock was acquired anyway.

So with this patch series we can now spawn concurrent writers and they
are expected to succeed, which is demonstrated by the test added by the
last patch.

Thanks!

Patrick

Patrick Steinhardt (3):
  refs/reftable: introduce "reftable.lockTimeout"
  reftable/stack: allow locking of outdated stacks
  refs/reftable: reload locked stack when preparing transaction

 Documentation/config/reftable.txt |  7 ++++
 refs/reftable-backend.c           |  9 ++++-
 reftable/reftable-stack.h         | 13 +++++-
 reftable/reftable-writer.h        |  8 ++++
 reftable/stack.c                  | 38 ++++++++++++------
 t/t0610-reftable-basics.sh        | 58 ++++++++++++++++++++++++++
 t/unit-tests/t-reftable-stack.c   | 67 ++++++++++++++++++++++++++++++-
 7 files changed, 181 insertions(+), 19 deletions(-)

-- 
2.46.0.551.gc5ee8f2d1c.dirty


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2024-10-02 10:58 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-17 13:43 [PATCH 0/3] reftable: graceful concurrent writes Patrick Steinhardt
2024-09-17 13:43 ` [PATCH 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
2024-09-17 17:46   ` karthik nayak
2024-09-17 17:50     ` Eric Sunshine
2024-09-18  4:31       ` Patrick Steinhardt
2024-09-18  4:31     ` Patrick Steinhardt
2024-09-17 13:43 ` [PATCH 2/3] reftable/stack: allow locking of outdated stacks Patrick Steinhardt
2024-09-17 13:43 ` [PATCH 3/3] refs/reftable: reload locked stack when preparing transaction Patrick Steinhardt
2024-09-17 18:26 ` [PATCH 0/3] reftable: graceful concurrent writes karthik nayak
2024-09-18  4:31   ` Patrick Steinhardt
2024-09-18  4:32 ` [PATCH v2 " Patrick Steinhardt
2024-09-18  4:32   ` [PATCH v2 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
2024-09-18  9:22     ` James Liu
2024-09-18  9:39       ` Patrick Steinhardt
2024-09-18  4:32   ` [PATCH v2 2/3] reftable/stack: allow locking of outdated stacks Patrick Steinhardt
2024-09-18  9:26     ` James Liu
2024-09-18  9:39       ` Patrick Steinhardt
2024-09-18  4:32   ` [PATCH v2 3/3] refs/reftable: reload locked stack when preparing transaction Patrick Steinhardt
2024-09-18  9:33   ` [PATCH v2 0/3] reftable: graceful concurrent writes James Liu
2024-09-18  9:59 ` [PATCH v3 " Patrick Steinhardt
2024-09-18  9:59   ` [PATCH v3 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
2024-09-19 21:34     ` Junio C Hamano
2024-09-18  9:59   ` [PATCH v3 2/3] reftable/stack: allow locking of outdated stacks Patrick Steinhardt
2024-09-20 18:10     ` Junio C Hamano
2024-09-24  5:33       ` Patrick Steinhardt
2024-09-18  9:59   ` [PATCH v3 3/3] refs/reftable: reload locked stack when preparing transaction Patrick Steinhardt
2024-09-18 23:23   ` [PATCH v3 0/3] reftable: graceful concurrent writes James Liu
2024-09-24  5:33     ` Patrick Steinhardt
2024-09-24  5:32 ` [PATCH v4 " Patrick Steinhardt
2024-09-24  5:33   ` [PATCH v4 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
2024-09-24  5:33   ` [PATCH v4 2/3] reftable/stack: allow locking of outdated stacks Patrick Steinhardt
2024-09-24  5:33   ` [PATCH v4 3/3] refs/reftable: reload locked stack when preparing transaction Patrick Steinhardt
2024-09-27  4:07     ` Jeff King
2024-09-30  6:49       ` Patrick Steinhardt
2024-09-30 22:19       ` Josh Steadmon
2024-10-01  4:27         ` Patrick Steinhardt
2024-10-01 22:54           ` Jeff King
2024-10-01 23:24             ` Junio C Hamano
2024-10-02 10:58               ` Patrick Steinhardt
2024-10-01  7:34         ` Junio C Hamano
2024-10-01 18:53           ` Josh Steadmon
2024-10-01 19:08             ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).