Skip to content
  • Andrew Kryczka's avatar
    Introduce max_background_jobs mutable option · bb01c188
    Andrew Kryczka authored
    Summary:
    - `max_background_flushes` and `max_background_compactions` are still supported for backwards compatibility
    - `base_background_compactions` is completely deprecated. Now we just throttle to one background compaction when there's no pressure.
    - `max_background_jobs` is added to automatically partition the concurrent background jobs into flushes vs compactions. Currently it's very simple as we just allocate one-fourth of the jobs to flushes, and the remaining can be used for compactions.
    - The test cases that set `base_background_compactions > 1` needed to be updated. I just grab the pressure token such that the desired number of compactions can be scheduled.
    Closes https://github.com/facebook/rocksdb/pull/2205
    
    Differential Revision: D4937461
    
    Pulled By: ajkr
    
    fbshipit-source-id: df52cbbd497e13bbc9a60560a5ac2a2526b3f1f9
    bb01c188