• P
    Have Cache use Status::MemoryLimit (#10262) · e6c5e0ab
    Peter Dillinger 提交于
    Summary:
    I noticed it would clean up some things to have Cache::Insert()
    return our MemoryLimit Status instead of Incomplete for the case in
    which the capacity limit is reached. I suspect this fixes some existing but
    unknown bugs where this Incomplete could be confused with other uses
    of Incomplete, especially no_io cases. This is the most suspicious case I
    noticed, but was not able to reproduce a bug, in part because the existing
    code is not covered by unit tests (FIXME added): https://github.com/facebook/rocksdb/blob/57adbf0e9187331cb39bf5cdb5f5d67faeee5f63/table/get_context.cc#L397
    
    I audited all the existing uses of IsIncomplete and updated those that
    seemed relevant.
    
    HISTORY updated with a clear warning to users of strict_capacity_limit=true
    to update uses of `IsIncomplete()`
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/10262
    
    Test Plan: updated unit tests
    
    Reviewed By: hx235
    
    Differential Revision: D37473155
    
    Pulled By: pdillinger
    
    fbshipit-source-id: 4bd9d9353ccddfe286b03ebd0652df8ce20f99cb
    e6c5e0ab
clock_cache.cc 18.7 KB