• Levi Tamasi's avatar
    Add missing check before calling PurgeObsoleteFiles in EnableFileDeletions (#5448) · a3b8c76d
    Levi Tamasi 创作于
    Summary:
    Calling PurgeObsoleteFiles with a JobContext for which HaveSomethingToDelete
    is false is a precondition violation. This would trigger an assertion in debug builds;
    however, in release builds with assertions disabled, this can result in the
    pending_purge_obsolete_files_ counter in DBImpl underflowing, which in turn can lead
    to the process hanging during database close.
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/5448
    
    Differential Revision: D15792569
    
    Pulled By: ltamasi
    
    fbshipit-source-id: 82d92c9b4f6a9efcdc69dbb3d5a52a1ae2dd2472
    a3b8c76d