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>
This commit is contained in:
Patrick Steinhardt
2024-05-13 10:18:38 +02:00
committed by Junio C Hamano
parent afbdbfae0b
commit f663d34306
5 changed files with 21 additions and 7 deletions

View File

@ -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