Compaction: restore files
Opened this issue · 2 comments
sherman commented
- Support of restore file operation requires changes in the compaction. When a partition is in deleted state a restore file operation must be prohibited.
- Another race is possible between a call of CompactionWorker.moveLiveFiles() method and CompactionWorker.setDeletedState(). If a file were restored after the query of live files, it will not be moved and will be deleted permanently. This race can be removed by running copy of live files state before a deleted partition will be removed permanently, in DeletedPartitionFinalizer worker.
sherman commented
2 is impossible, because we have gc grace time. This time used for checking of expiration. When a deleted file is expired, it will never be restored. So, a state will not change.
sherman commented
So, a file can be restored only if it's not expired.