Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
7.1.0
Description
For space reclamation after collection drop, magma-kvstore uses magma prefix compaction API to partially compact the kvstore data that belongs to a collection key prefix range.
If the batch of collections to be dropped are large, key prefix compaction may internally rewrite the same data repeatedly and can take a long time (Prefix compaction works by finding the sstables which belong to the prefix and rewriting the sstables by excluding those ranges). Since we maintain some collection size heuristics, we can issue full compaction instead of prefix compaction when full compaction is efficient. For eg., if the list of collections to be dropped contributes to > 40% of the bucket size, a full compaction will be much more efficient as it needs to rewrite the data only once.