• P
    Make backup restore atomic, with sync option (#8568) · a7fd1d08
    Peter Dillinger 提交于
    Summary:
    Guarantees that if a restore is interrupted, DB::Open will fail. This works by
    restoring CURRENT first to CURRENT.tmp then as a final step renaming to CURRENT.
    
    Also makes restore respect BackupEngineOptions::sync (default true). When set,
    the restore is guaranteed persisted by the time it returns OK. Also makes the above
    atomicity guarantee work in case the interruption is power loss or OS crash (not just
    process interruption or crash).
    
    Fixes https://github.com/facebook/rocksdb/issues/8500
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/8568
    
    Test Plan:
    added to backup mini-stress unit test. Passes with
    gtest_repeat=100 (whereas fails 7 times without the CURRENT.tmp)
    
    Reviewed By: akankshamahajan15
    
    Differential Revision: D29812605
    
    Pulled By: pdillinger
    
    fbshipit-source-id: 24e9a993b305b1835ca95558fa7a7152e54cda8e
    a7fd1d08
可在Tags中查看这些版本中当前仓库的状态.
HISTORY.md 176.9 KB