Revision 8a72bb14bd0caf0fe0ab6c6efb236832beed1f44 authored by Peter Dillinger on 14 November 2019, 14:18:23 UTC, committed by Peter Dillinger on 15 November 2019, 20:15:12 UTC
Summary:
Production:
* Fixes GarbageCollect (and auto-GC triggered by PurgeOldBackups, DeleteBackup, or CreateNewBackup) to clean up backup directory independent of current settings (except max_valid_backups_to_open; see issue https://github.com/facebook/rocksdb/issues/4997) and prior settings used with same backup directory.
* Fixes GarbageCollect (and auto-GC) not to attempt to remove "." and ".." entries from directories.
* Clarifies contract with users in modifying BackupEngine operations. In short, leftovers from any incomplete operation are cleaned up by any subsequent call to that same kind of operation (PurgeOldBackups and DeleteBackup considered the same kind of operation). GarbageCollect is available to clean up after all kinds. (NB: right now PurgeOldBackups and DeleteBackup will clean up after incomplete CreateNewBackup, but we aren't promising to continue that behavior.)
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6023

Test Plan:
* Refactors open parameters to use an option enum, for readability, etc. (Also fixes an unused parameter bug in the redundant OpenDBAndBackupEngineShareWithChecksum.)
* Fixes an apparent bug in ShareTableFilesWithChecksumsTransition in which old backup data was destroyed in the transition to be tested. That test is now augmented to ensure GarbageCollect (or auto-GC) does not remove shared files when BackupEngine is opened with share_table_files=false.
* Augments DeleteTmpFiles test to ensure that CreateNewBackup does auto-GC when an incompletely created backup is detected.

Differential Revision: D18453559

Pulled By: pdillinger

fbshipit-source-id: 5e54e7b08d711b161bc9c656181012b69a8feac4
1 parent a6d4183
History
File Mode Size
delete_scheduler.cc -rw-r--r-- 10.8 KB
delete_scheduler.h -rw-r--r-- 4.8 KB
delete_scheduler_test.cc -rw-r--r-- 24.7 KB
file_util.cc -rw-r--r-- 3.6 KB
file_util.h -rw-r--r-- 1.2 KB
filename.cc -rw-r--r-- 13.8 KB
filename.h -rw-r--r-- 7.3 KB
sst_file_manager_impl.cc -rw-r--r-- 17.7 KB
sst_file_manager_impl.h -rw-r--r-- 7.2 KB

back to top