• B
    Dynamically changeable `MemPurge` option (#10011) · 5879053f
    Baptiste Lemaire 提交于
    Summary:
    **Summary**
    Make the mempurge option flag a Mutable Column Family option flag. Therefore, the mempurge feature can be dynamically toggled.
    
    **Motivation**
    RocksDB users prefer having the ability to switch features on and off without having to close and reopen the DB. This is particularly important if the feature causes issues and needs to be turned off. Dynamically changing a DB option flag does not seem currently possible.
    Moreover, with this new change, the MemPurge feature can be toggled on or off independently between column families, which we see as a major improvement.
    
    **Content of this PR**
    This PR includes removal of the `experimental_mempurge_threshold` flag as a DB option flag, and its re-introduction as a `MutableCFOption` flag. I updated the code to handle dynamic changes of the flag (in particular inside the `FlushJob` file). Additionally, this PR includes a new test to demonstrate the capacity of the code to toggle the MemPurge feature on and off, as well as the addition in the `db_stress` module of 2 different mempurge threshold values (0.0 and 1.0) that can be randomly changed with the `set_option_one_in` flag. This is useful to stress test the dynamic changes.
    
    **Benchmarking**
    I will add numbers to prove that there is no performance impact within the next 12 hours.
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/10011
    
    Reviewed By: pdillinger
    
    Differential Revision: D36462357
    
    Pulled By: bjlemaire
    
    fbshipit-source-id: 5e3d63bdadf085c0572ecc2349e7dd9729ce1802
    5879053f
column_family.cc 63.1 KB