mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-04 09:42:06 +00:00
It's possible for a srch compaction to collapse down to nothing if given evenly paired create/delete entries. In this case, we were emitting an empty block. This could cause problems for search_sorted_file(), which assumes that every block it sees has a valid first and last entry. Fix this by keeping a temp entry and only emitting it if it differs from the next entry in the block. Be sure to flush out a straggling temp entry if we have one when we're done with the last block of the merge. Signed-off-by: Chris Kirby <ckirby@versity.com>