rocksdb/db
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
..
builder.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
builder.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
c_test.c Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
c.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
corruption_test.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
db_bench.cc LRUCache to try to clean entries not referenced first. 2013-10-11 09:26:21 -07:00
db_filesnapshot.cc Add option for storing transaction logs in a separate dir 2013-10-08 17:40:27 -07:00
db_impl_readonly.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
db_impl_readonly.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
db_impl.cc Fixing error in ParseFileName causing DestroyDB to fail on archive directory 2013-10-10 18:18:31 -07:00
db_impl.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
db_iter.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
db_iter.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
db_statistics.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
db_stats_logger.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
db_test.cc Fixing error in ParseFileName causing DestroyDB to fail on archive directory 2013-10-10 18:18:31 -07:00
dbformat_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
dbformat.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
dbformat.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
deletefile_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
filename_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
filename.cc Add option for storing transaction logs in a separate dir 2013-10-08 17:40:27 -07:00
filename.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
log_format.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
log_reader.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
log_reader.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
log_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
log_writer.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
log_writer.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
memtable.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
memtable.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
memtablelist.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
memtablelist.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
merge_helper.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
merge_helper.h Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
merge_operator.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
merge_test.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
perf_context_test.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
prefix_filter_iterator.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
repair.cc Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
skiplist_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
skiplist.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
snapshot.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
table_cache.cc LRUCache to try to clean entries not referenced first. 2013-10-11 09:26:21 -07:00
table_cache.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
transaction_log_impl.cc Add option for storing transaction logs in a separate dir 2013-10-08 17:40:27 -07:00
transaction_log_impl.h Add option for storing transaction logs in a separate dir 2013-10-08 17:40:27 -07:00
version_edit_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
version_edit.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
version_edit.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
version_set_reduce_num_levels.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
version_set_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
version_set.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
version_set.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
write_batch_internal.h Migrate names of properties from 'leveldb' prefix to 'rocksdb' prefix. 2013-10-06 00:14:26 -07:00
write_batch_test.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00
write_batch.cc Change namespace from leveldb to rocksdb 2013-10-04 11:59:26 -07:00