vinyl: delete runs compacted during join immediately
We keep run files corresponding to (at least) the last snapshot, because we need them for backups and replication. Deletion of compacted run files is postponed until the next snapshot. As a consequence, we don't delete run files created on a replica during the join stage. However, in contrast to run files created during normal operation, these are pure garbage and should be deleted right away. Not deleting them can result in depletion of disk space, because vinyl has quite high write amplification by design. We can't write a functional test for this, because there's no way to guarantee that compaction started during join will finish before join completion - if it doesn't, compacted runs won't be removed, because they will be assigned to the snapshot created by join. Closes #3162
Showing
- src/box/vinyl.c 2 additions, 15 deletionssrc/box/vinyl.c
- src/box/vy_run.c 19 additions, 0 deletionssrc/box/vy_run.c
- src/box/vy_run.h 9 additions, 0 deletionssrc/box/vy_run.h
- src/box/vy_scheduler.c 17 additions, 0 deletionssrc/box/vy_scheduler.c
- test/vinyl/replica_quota.lua 0 additions, 0 deletionstest/vinyl/replica_quota.lua
- test/vinyl/replica_quota.result 26 additions, 2 deletionstest/vinyl/replica_quota.result
- test/vinyl/replica_quota.test.lua 14 additions, 2 deletionstest/vinyl/replica_quota.test.lua
Loading
Please register or sign in to comment