diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-05-13 10:18:38 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-05-14 02:02:39 +0200 |
commit | f663d34306d414bca27cf6b5dc7affb00e8603fe (patch) | |
tree | bc9bbb0beb771f18a52fbc8b49e486e1ee35685a /reftable/stack.h | |
parent | refs/reftable: allow disabling writing the object index (diff) | |
download | git-f663d34306d414bca27cf6b5dc7affb00e8603fe.tar.xz git-f663d34306d414bca27cf6b5dc7affb00e8603fe.zip |
reftable: make the compaction factor configurable
When auto-compacting, the reftable library packs references such that
the sizes of the tables form a geometric sequence. The factor for this
geometric sequence is hardcoded to 2 right now. We're about to expose
this as a config option though, so let's expose the factor via write
options.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/stack.h')
-rw-r--r-- | reftable/stack.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/reftable/stack.h b/reftable/stack.h index 97d7ebc043..5b45cff4f7 100644 --- a/reftable/stack.h +++ b/reftable/stack.h @@ -35,6 +35,7 @@ struct segment { uint64_t bytes; }; -struct segment suggest_compaction_segment(uint64_t *sizes, size_t n); +struct segment suggest_compaction_segment(uint64_t *sizes, size_t n, + uint8_t factor); #endif |