• A
    prevent stranded LATEST_BACKUP in BackupEngineTest.NoDeleteWithReadOnly (#8887) · dd092c2d
    Andrew Kryczka 提交于
    Summary:
    A "LATEST_BACKUP" file was left in the backup directory by
    "BackupEngineTest.NoDeleteWithReadOnly" test, affecting future test
    runs. In particular, it caused "BackupEngineTest.IOStats" to fail since
    it relies on backup directory containing only data written by its
    `BackupEngine`.
    
    The fix is to promote "LATEST_BACKUP" to an explicitly managed file so
    it is deleted in `BackupEngineTest` constructor if it exists.
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/8887
    
    Test Plan:
    below command used to fail. Now it passes:
    
    ```
    $ TEST_TMPDIR=/dev/shm ./backupable_db_test --gtest_filter='BackupEngineTest.NoDeleteWithReadOnly:BackupEngineTest.IOStats'
    ```
    
    Reviewed By: pdillinger
    
    Differential Revision: D30812336
    
    Pulled By: ajkr
    
    fbshipit-source-id: 32dfbe1368ebdab872e610764bfea5daf9a2af09
    dd092c2d
backupable_db_test.cc 134.4 KB