mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-29 11:15:47 +00:00
As totl items are merged they're supposed to be dropped if both their count and total are zero. It's a slight mechanical simplification because it means deletions can emit the same delta items as non-deletion changes. The btree code that does this has a day-one bug where it clobbers the return value of the delta combination before checking it. The resulting items are still correct but they don't need to exist. Readers ignore them. The easy fix doesn't clobber the delta combination result in the merge loop so the zero items won't be written by the merge. Since these were ignored by readers there won't be a user-facing change. We'll do less work in the future as zero items aren't written and the next merge will drop all the existing items that were left behind by previous merges. Signed-off-by: Zach Brown <zab@versity.com>