rocksdb/util
sdong f8509653ba LRUCache to try to clean entries not referenced first.
Summary:
With this patch, when LRUCache.Insert() is called and the cache is full, it will first try to free up entries whose reference counter is 1 (would become 0 after remo\
ving from the cache). We do it in two passes, in the first pass, we only try to release those unreferenced entries. If we cannot free enough space after traversing t\
he first remove_scan_cnt_ entries, we start from the beginning again and remove those entries being used.

Test Plan: add two unit tests to cover the codes

Reviewers: dhruba, haobo, emayanke

Reviewed By: emayanke

CC: leveldb, emayanke, xjin

Differential Revision: https://reviews.facebook.net/D13377
2013-10-11 09:26:21 -07:00
..
arena_impl.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
arena_impl.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
arena_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
auto_roll_logger_test.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
auto_roll_logger.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
auto_roll_logger.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
bit_set.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
bloom_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
bloom.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
build_version.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
cache_test.cc LRUCache to try to clean entries not referenced first. 2013-10-11 09:26:21 -07:00
cache.cc LRUCache to try to clean entries not referenced first. 2013-10-11 09:26:21 -07:00
coding_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
coding.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
coding.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
comparator.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
crc32c_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
crc32c.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
crc32c.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
env_hdfs.cc Fixing build failure 2013-10-10 01:01:16 -07:00
env_posix.cc Env class that can randomly read and write 2013-10-10 00:03:08 -07:00
env_test.cc Env class that can randomly read and write 2013-10-10 00:03:08 -07:00
env.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
filelock_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
filter_policy.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
hash.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
hash.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
histogram_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
histogram.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
histogram.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
ldb_cmd_execute_result.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
ldb_cmd.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
ldb_cmd.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
ldb_tool.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
logging.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
logging.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
manual_compaction_test.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
murmurhash.cc Implement RowLocks for assoc schema 2012-10-03 23:19:01 -07:00
murmurhash.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
mutexlock.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
options.cc LRUCache to try to clean entries not referenced first. 2013-10-11 09:26:21 -07:00
perf_context_imp.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
perf_context.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
posix_logger.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
random.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
signal_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
skiplistrep.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
slice.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
stack_trace.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
statistics.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
stats_logger.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
status.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
stl_wrappers.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
stop_watch.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
string_util.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
string_util.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
testharness.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
testharness.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
testutil.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
testutil.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
transformrep.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
vectorrep.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00