git/reftable
Patrick Steinhardt 558f6fbeb1 reftable/stack: simplify tracking of table locks
When compacting tables, we store the locks of all tables we are about to
compact in the `table_locks` array. As we currently only ever compact
all tables in the user-provided range or none, we simply track those
locks via the indices of the respective tables in the merged stack.

This is about to change though, as we will introduce a mode where auto
compaction gracefully handles the case of already-locked files. In this
case, it may happen that we only compact a subset of the user-supplied
range of tables. In this case, the indices will not necessarily match
the lock indices anymore.

Refactor the code such that we track the number of locks via a separate
variable. The resulting code is expected to perform the same, but will
make it easier to perform the described change.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-08 10:14:42 -07:00
..
LICENSE
basics.c global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
basics.h global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
block.c reftable/block: use `size_t` to track restart point index 2024-05-13 17:04:16 -07:00
block.h reftable: use `uint16_t` to track restart interval 2024-05-13 17:02:38 -07:00
block_test.c reftable: cast away constness when assigning constants to records 2024-06-07 10:30:49 -07:00
blocksource.c
blocksource.h
constants.h reftable: make the compaction factor configurable 2024-05-13 17:02:39 -07:00
dump.c hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
error.c Merge branch 'ps/reftable-write-optim' 2024-05-08 10:18:43 -07:00
generic.c reftable/generic: adapt interface to allow reuse of iterators 2024-05-13 17:04:18 -07:00
generic.h reftable/generic: move seeking of records into the iterator 2024-05-13 17:04:18 -07:00
iter.c reftable/generic: adapt interface to allow reuse of iterators 2024-05-13 17:04:18 -07:00
iter.h
merged.c Merge branch 'ps/ref-storage-migration' 2024-06-17 15:55:55 -07:00
merged.h Merge branch 'ps/ref-storage-migration' 2024-06-17 15:55:55 -07:00
pq.c
pq.h
pq_test.c
publicbasics.c
reader.c Merge branch 'ps/reftable-reusable-iterator' 2024-05-30 14:15:12 -07:00
reader.h
readwrite_test.c Merge branch 'ps/no-writable-strings' 2024-06-17 15:55:58 -07:00
record.c global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
record.h
reftable-blocksource.h
reftable-error.h Merge branch 'ps/reftable-write-optim' 2024-05-08 10:18:43 -07:00
reftable-generic.h reftable/generic: adapt interface to allow reuse of iterators 2024-05-13 17:04:18 -07:00
reftable-iterator.h reftable/generic: adapt interface to allow reuse of iterators 2024-05-13 17:04:18 -07:00
reftable-malloc.h
reftable-merged.h reftable/merged: adapt interface to allow reuse of iterators 2024-05-13 17:04:19 -07:00
reftable-reader.h Merge branch 'ps/reftable-reusable-iterator' 2024-05-30 14:15:12 -07:00
reftable-record.h hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
reftable-stack.h Merge branch 'ps/reftable-reusable-iterator' 2024-05-30 14:15:12 -07:00
reftable-tests.h t: move reftable/merged_test.c to the unit testing framework 2024-07-12 09:55:39 -07:00
reftable-writer.h reftable: make the compaction factor configurable 2024-05-13 17:02:39 -07:00
stack.c reftable/stack: simplify tracking of table locks 2024-08-08 10:14:42 -07:00
stack.h reftable: make the compaction factor configurable 2024-05-13 17:02:39 -07:00
stack_test.c reftable/stack: update stats on failed full compaction 2024-08-08 10:14:42 -07:00
system.h hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
test_framework.c
test_framework.h
tree.c
tree.h
tree_test.c
writer.c reftable/writer: improve error when passed an invalid block size 2024-05-13 17:02:38 -07:00
writer.h