vinyl: fix force compaction logic
This patch addresses a few problems index.compact() is suffering from, namely: - When a range is split or coalesced, it should inherit the value of needs_compaction flag from the source ranges. Currently, the flag is cleared so that the resulting range may be not compacted. - If a range has no slices, we shouldn't set needs_compaction flag for it, because obviously it can't be compacted, but we do. - The needs_compaction flag should be cleared as soon as we schedule a range for compaction, not when all slices have been compacted into one, as we presently expect, because the latter may never happen under a write-intensive load.
Loading
Please register or sign in to comment