1. 06 3月, 2018 1 次提交
  2. 23 2月, 2018 2 次提交
  3. 29 7月, 2017 1 次提交
    • S
      Replace dynamic_cast<> · 21696ba5
      Siying Dong 提交于
      Summary:
      Replace dynamic_cast<> so that users can choose to build with RTTI off, so that they can save several bytes per object, and get tiny more memory available.
      Some nontrivial changes:
      1. Add Comparator::GetRootComparator() to get around the internal comparator hack
      2. Add the two experiemental functions to DB
      3. Add TableFactory::GetOptionString() to avoid unnecessary casting to get the option string
      4. Since 3 is done, move the parsing option functions for table factory to table factory files too, to be symmetric.
      Closes https://github.com/facebook/rocksdb/pull/2645
      
      Differential Revision: D5502723
      
      Pulled By: siying
      
      fbshipit-source-id: fd13cec5601cf68a554d87bfcf056f2ffa5fbf7c
      21696ba5
  4. 22 7月, 2017 2 次提交
  5. 16 7月, 2017 1 次提交
  6. 28 4月, 2017 1 次提交
  7. 25 4月, 2017 1 次提交
    • M
      Add erase option to release cache · 4c9447d8
      Maysam Yabandeh 提交于
      Summary:
      This is useful when we put the entries in the block cache for accounting
      purposes and do not expect it to be used after it is released. If the cache does not
      erase the item in such cases not only the performance of cache is
      negatively affected but the item's destructor not being called at the
      time of release might violate the assumptions about the lifetime of the
      object.
      
      The new change adds a force_erase option to the Release method and
      returns a boolean to indicate whehter the item is successfully deleted.
      Closes https://github.com/facebook/rocksdb/pull/2180
      
      Differential Revision: D4916032
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: 94409a346069923cac9de8e57adc313b4ed46f28
      4c9447d8
  8. 06 4月, 2017 1 次提交
  9. 27 1月, 2017 1 次提交
  10. 11 1月, 2017 1 次提交
    • A
      Allow incrementing refcount on cache handles · fe395fb6
      Andrew Kryczka 提交于
      Summary:
      Previously the only way to increment a handle's refcount was to invoke Lookup(), which (1) did hash table lookup to get cache handle, (2) incremented that handle's refcount. For a future DeleteRange optimization, I added a function, Ref(), for when the caller already has a cache handle and only needs to do (2).
      Closes https://github.com/facebook/rocksdb/pull/1761
      
      Differential Revision: D4397114
      
      Pulled By: ajkr
      
      fbshipit-source-id: 9addbe5
      fe395fb6
  11. 31 8月, 2016 1 次提交
    • Y
      Fix ClockCache memory leak · de47e2bd
      Yi Wu 提交于
      Summary:
      Fix ClockCache memory leak found by valgrind:
      # Add destructor to cleanup cached values.
      # Delete key with cache handle immediately after handle is recycled, and erase table entry immediately if duplicated cache entry is inserted.
      
      Test Plan:
          make DISABLE_JEMALLOC=1 valgrind_check
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D62973
      de47e2bd
  12. 24 8月, 2016 1 次提交
  13. 20 8月, 2016 2 次提交
    • Y
      LRU cache mid-point insertion · 72f8cc70
      Yi Wu 提交于
      Summary:
      Add mid-point insertion functionality to LRU cache. Caller of `Cache::Insert()` can set an additional parameter to make a cache entry have higher priority. The LRU cache will reserve at most `capacity * high_pri_pool_pct` bytes for high-pri cache entries. If `high_pri_pool_pct` is zero, the cache degenerates to normal LRU cache.
      
      Context: If we are to put index and filter blocks into RocksDB block cache, index/filter block can be swap out too early. We want to add an option to RocksDB to reserve some capacity in block cache just for index/filter blocks, to mitigate the issue.
      
      In later diffs I'll update block based table reader to use the interface to cache index/filter blocks at high priority, and expose the option to `DBOptions` and make it dynamic changeable.
      
      Test Plan: unit test.
      
      Reviewers: IslamAbdelRahman, sdong, lightmark
      
      Reviewed By: lightmark
      
      Subscribers: andrewkr, dhruba, march, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61977
      72f8cc70
    • Y
      Introduce ClockCache · 4cc37f59
      Yi Wu 提交于
      Summary:
      Clock-based cache implemenetation aim to have better concurreny than
      default LRU cache. See inline comments for implementation details.
      
      Test Plan:
      Update cache_test to run on both LRUCache and ClockCache. Adding some
      new tests to catch some of the bugs that I fixed while implementing the
      cache.
      
      Reviewers: kradhakrishnan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61647
      4cc37f59