You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CompactRange with change_level = true will move all the files of the level #7441
The goal of change_level is to support compaction migrations (e.g., changing num_levels, changing level_compaction_dynamic_level_bytes, etc.). Such migrations are only possible if we migrate all the files in the level. I agree it is pretty confusing because we allow CompactRange() to specify non-nullptr endpoints together with change_level = true, which almost guarantees the level change (RefitLevel()) step will fail.
Is there a use case for moving only some of a level's files to another level?
The goal of change_level is to support compaction migrations (e.g., changing num_levels, changing level_compaction_dynamic_level_bytes, etc.). Such migrations are only possible if we migrate all the files in the level. I agree it is pretty confusing because we allow CompactRange() to specify non-nullptr endpoints together with change_level = true, which almost guarantees the level change (RefitLevel()) step will fail.
Thanks for explanation. No use case, just want to leverage it for unit test to reproduce some cases.
Activity
ajkr commentedon Sep 29, 2020
The goal of change_level is to support compaction migrations (e.g., changing num_levels, changing level_compaction_dynamic_level_bytes, etc.). Such migrations are only possible if we migrate all the files in the level. I agree it is pretty confusing because we allow
CompactRange()to specify non-nullptr endpoints together withchange_level = true, which almost guarantees the level change (RefitLevel()) step will fail.Is there a use case for moving only some of a level's files to another level?
Connor1996 commentedon Oct 9, 2020
Thanks for explanation. No use case, just want to leverage it for unit test to reproduce some cases.
ajkr commentedon Mar 23, 2021
Tested it just now - it returned a reasonably good error without doing any damage (maybe the partial compaction work is wasted, idk).
I think it is fine to support this if someone wants, but we don't have a use case either.