[PATCH v2 00/11] reftable: small set of fixes
From: Patrick Steinhardt <hidden>
Date: 2023-12-08 14:53:01
Hi,
this is the second version of my patch series that addresses several
smallish issues in the reftable backend. Given that the first version
didn't receive any reviews yet I decided to squash in additional
findings into this series. This is both to reduce the number of follow
up series, but also to hopefully push this topic onto the radar of folks
on the mailing list.
Changes compared to v1:
- Allocations were optimized further for `struct merged_iter` by
making the buffers part of the structure itself so that they can
be reused across iterations.
- Allocations were optimized for `struct block_iter` in the same
way.
- Temporary stacks have a supposedly-random suffix so that concurrent
writers don't conflict with each other. We used unseeded `rand()`
calls for it though, so they weren't random after all. This is fixed
by converting to use `git_rand()` instead.
Patrick
Patrick Steinhardt (11):
reftable: wrap EXPECT macros in do/while
reftable: handle interrupted reads
reftable: handle interrupted writes
reftable/stack: verify that `reftable_stack_add()` uses
auto-compaction
reftable/stack: perform auto-compaction with transactional interface
reftable/stack: reuse buffers when reloading stack
reftable/stack: fix stale lock when dying
reftable/stack: fix use of unseeded randomness
reftable/merged: reuse buffer to compute record keys
reftable/block: introduce macro to initialize `struct block_iter`
reftable/block: reuse buffer to compute record keys
reftable/block.c | 23 ++++-----
reftable/block.h | 6 +++
reftable/block_test.c | 4 +-
reftable/blocksource.c | 2 +-
reftable/iter.h | 8 +--
reftable/merged.c | 31 +++++------
reftable/merged.h | 2 +
reftable/reader.c | 7 ++-
reftable/readwrite_test.c | 6 +--
reftable/stack.c | 73 +++++++++++---------------
reftable/stack_test.c | 105 +++++++++++++++++++++++++++++++++++++-
reftable/test_framework.h | 58 +++++++++++----------
12 files changed, 211 insertions(+), 114 deletions(-)
--
2.43.0
Attachments
- signature.asc [application/pgp-signature] 833 bytes