• S
    Slow down writes by bytes written · 7842920b
    sdong 提交于
    Summary:
    We slow down data into the database to the rate of options.delayed_write_rate (a new option) with this patch.
    
    The thread synchronization approach I take is to still synchronize write controller by DB mutex and GetDelay() is inside DB mutex. Try to minimize the frequency of getting time in GetDelay(). I verified it through db_bench and it seems to work
    
    hard_rate_limit is deprecated.
    
    options.delayed_write_rate is still not dynamically changeable. Need to work on it as a follow-up.
    
    Test Plan: Add new unit tests in db_test
    
    Reviewers: yhchiang, rven, kradhakrishnan, anthony, MarkCallaghan, igor
    
    Reviewed By: igor
    
    Subscribers: ikabiljo, leveldb, dhruba
    
    Differential Revision: https://reviews.facebook.net/D36351
    7842920b
db_impl.h 30.8 KB