Thread (45 messages) 45 messages, 2 authors, 2024-04-03
STALE831d
Revisions (4)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]

[PATCH 0/7] reftable: improvements for the `binsearch()` mechanism

From: Patrick Steinhardt <hidden>
Date: 2024-03-22 12:22:34

Hi,

this patch series contains various improvements for the `binsearch()`
mechanism used by the reftable library:

  - Callsites are refactored to make it more obvious what exactly they
    are doing. This mostly involves improved names for callback
    functions.

  - Error handling is improved such that binsearch() knows to abort when
    the callback returns a negative value.

  - Error handling for binary searching over restart counters is fixed
    so that we check for errors at the correct point in time.

  - Decoding of record keys is refactored when searching over restart
    counters to not require allocations anymore.

Thanks!

Patrick

Patrick Steinhardt (7):
  reftable/basics: fix return type of `binsearch()` to be `size_t`
  reftable/basics: improve `binsearch()` test
  reftable/refname: refactor binary search over refnames
  reftable/block: refactor binary search over restart points
  reftable/block: fix error handling when searching restart points
  reftable/record: extract function to decode key lengths
  reftable/block: avoid decoding keys when searching restart points

 reftable/basics.c      |   7 ++-
 reftable/basics.h      |   7 +--
 reftable/basics_test.c |  55 +++++++++++---------
 reftable/block.c       | 114 ++++++++++++++++++++++++++++++-----------
 reftable/record.c      |  34 ++++++++----
 reftable/record.h      |   6 +++
 reftable/refname.c     |  53 +++++++++----------
 7 files changed, 179 insertions(+), 97 deletions(-)

-- 
2.44.0

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help