Yi Wu badbff65b7 Not insert into block cache if cache is full and not holding handle
Summary:
We used to allow insert into full block cache as long as `strict_capacity_limit=false`. This diff further restrict insert to full cache if caller don't intent to hold handle to the cache entry after insert.

Hope this diff fix the assertion failure with db_stress: https://our.intern.facebook.com/intern/sandcastle/log/?instance_id=211853102&step_id=2475070014

  db_stress: util/lru_cache.cc:278: virtual void rocksdb::LRUCacheShard::Release(rocksdb::Cache::Handle*): Assertion `lru_.next == &lru_' failed.

The assertion at lru_cache.cc:278 can fail when an entry is inserted into full cache and stay in LRU list.

Test Plan:
  make all check

Reviewers: IslamAbdelRahman, lightmark, sdong

Reviewed By: sdong

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D62325
2016-08-23 13:53:49 -07:00
..
2016-05-17 13:11:56 -07:00
2016-05-17 13:11:56 -07:00
2016-06-09 19:03:10 -07:00
2016-07-08 17:50:51 -07:00
2016-08-11 23:34:19 -07:00
2016-07-08 17:50:51 -07:00
2016-07-27 18:45:53 -07:00
2016-07-13 15:36:22 -07:00
2016-06-25 08:29:40 +01:00