• C
    Get manifest size again after getting min_log_num during checkpoint (#7836) · b2e30bdb
    Cheng Chang 提交于
    Summary:
    Currently, manifest size is determined before getting min_log_num.
    
    But between getting manifest size and getting min_log_num, concurrently, a flush might succeed, which will write new records to manifest to make some WALs become outdated, then min_log_num will be correspondingly increased, but the new records in manifest will not be copied into the checkpoint because the manifest's size is determined before them, then the newly outdated WALs will still exist in the checkpoint's manifest, but they are not linked/copied to the checkpoint because their log number is < min_log_num, so a corruption of missing WAL will be reported when restoring from the checkpoint.
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/7836
    
    Test Plan: make crash_test
    
    Reviewed By: ajkr
    
    Differential Revision: D25788204
    
    Pulled By: cheng-chang
    
    fbshipit-source-id: a4e5acf30f08270b3c0a95304ff559a9e655252f
    b2e30bdb
checkpoint_impl.cc 21.5 KB