rocksdb/db
sdong fa430bfd04 Minimize accessing multiple objects in Version::Get()
Summary:
One of our profilings shows that Version::Get() sometimes is slow when getting pointer of user comparators or other global objects. In this patch:
(1) we keep pointers of immutable objects in Version to avoid accesses them though option objects or cfd objects
(2) table_reader is directly cached in FileMetaData so that table cache don't have to go through handle first to fetch it
(3) If level 0 has less than 3 files, skip the filtering logic based on SST tables' key range. Smallest and largest key are stored in separated memory locations, which has potential cache misses

Test Plan: make all check

Reviewers: haobo, ljin

Reviewed By: haobo

CC: igor, yhchiang, nkg-, leveldb

Differential Revision: https://reviews.facebook.net/D17739
2014-04-17 14:14:00 -07:00
..
builder.cc Enhance partial merge to support multiple arguments 2014-03-24 17:57:13 -07:00
builder.h [Performance Branch] PlainTable to encode rows with seqID 0, value type using 1 internal byte. 2014-02-03 12:19:30 -08:00
c.cc RocksDBLite 2014-04-15 13:39:26 -07:00
c_test.c Turn on -Wmissing-prototypes 2014-04-09 21:17:14 -07:00
column_family.cc Don't overflow size_t in mac 2014-04-16 15:15:22 -07:00
column_family.h thread local for tailing iterator 2014-04-14 10:48:01 -07:00
column_family_test.cc Close DB at the end of DontRollEmptyLogs test 2014-04-15 17:20:56 -07:00
compaction.cc Merge branch 'master' into columnfamilies 2014-03-19 17:22:20 -07:00
compaction.h Merge branch 'master' into columnfamilies 2014-02-12 14:01:30 -08:00
compaction_picker.cc Merge branch 'master' into columnfamilies 2014-04-07 11:31:11 -07:00
compaction_picker.h [CF] Code cleanup part 1 2014-03-12 09:56:53 -07:00
corruption_test.cc make corruption_test:CompactionInputErrorParanoid deterministic 2014-04-11 12:48:38 -07:00
db_bench.cc Fix db_bench's multireadrandom 2014-04-14 15:43:34 -07:00
db_filesnapshot.cc RocksDBLite 2014-04-15 13:39:26 -07:00
db_impl.cc Minimize accessing multiple objects in Version::Get() 2014-04-17 14:14:00 -07:00
db_impl.h Fix compile issues when doing make release 2014-04-15 16:00:10 -07:00
db_impl_debug.cc Fix compile issues when doing make release 2014-04-15 16:00:10 -07:00
db_impl_readonly.cc Minimize accessing multiple objects in Version::Get() 2014-04-17 14:14:00 -07:00
db_impl_readonly.h [CF] Rethinking ColumnFamilyHandle and fix to dropping column families 2014-02-12 13:47:09 -08:00
db_iter.cc thread local for tailing iterator 2014-04-14 10:48:01 -07:00
db_iter.h thread local for tailing iterator 2014-04-14 10:48:01 -07:00
db_stats_logger.cc RocksDBLite 2014-04-15 13:39:26 -07:00
db_test.cc When creating a new DB, fail it when wal_dir contains existing log files 2014-04-15 14:01:57 -07:00
dbformat.cc macros for perf_context 2014-04-08 10:58:07 -07:00
dbformat.h Enable hash index for block-based table 2014-04-10 14:19:43 -07:00
dbformat_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
deletefile_test.cc Start DeleteFileTest with clean plate 2013-11-15 16:30:23 -08:00
filename.cc Remove tautological assert 2014-04-16 09:09:28 -07:00
filename.h Unify DeleteFile and DeleteWalFiles 2013-10-25 08:32:14 -07:00
filename_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
internal_stats.cc Merge branch 'master' into columnfamilies 2014-03-31 13:39:24 -07:00
internal_stats.h Merge branch 'master' into columnfamilies 2014-03-31 13:39:24 -07:00
log_format.h Some minor refactoring on the code 2014-01-02 16:32:31 -08:00
log_reader.cc Make Log::Reader more robust 2014-02-28 13:19:47 -08:00
log_reader.h Fix UnmarkEOF for partial blocks 2014-01-27 14:49:10 -08:00
log_test.cc Make it compile on Debian/GCC 4.7 2014-03-14 22:44:35 +00:00
log_writer.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
log_writer.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
memtable.cc macros for perf_context 2014-04-08 10:58:07 -07:00
memtable.h Merge branch 'master' into columnfamilies 2014-03-13 13:21:20 -07:00
memtable_list.cc Merge branch 'master' into columnfamilies 2014-04-07 11:31:11 -07:00
memtable_list.h Merge branch 'master' into columnfamilies 2014-04-07 11:31:11 -07:00
merge_context.h Enhance partial merge to support multiple arguments 2014-03-24 17:57:13 -07:00
merge_helper.cc Fix the bug in MergeUtil which causes mixing values of different keys. 2014-03-27 16:15:25 -07:00
merge_helper.h [rocksdb] new CompactionFilterV2 API 2014-03-24 20:47:53 -07:00
merge_operator.cc Some small cleaning up to make some compiling environment happy 2014-03-26 18:11:41 -07:00
merge_test.cc Fix merge_test failure due to incorrect assert behavior in the release mode. 2014-04-14 12:06:49 -07:00
perf_context_test.cc Missing includes 2014-03-14 13:02:20 -07:00
plain_table_db_test.cc Turn on -Wmissing-prototypes 2014-04-09 21:17:14 -07:00
prefix_filter_iterator.h Moving Some includes from options.h to forward declaration 2014-01-24 17:16:22 -08:00
prefix_test.cc Turn on -Wmissing-prototypes 2014-04-09 21:17:14 -07:00
repair.cc RocksDBLite 2014-04-15 13:39:26 -07:00
simple_table_db_test.cc Make table properties shareable 2014-02-07 19:26:49 -08:00
skiplist.h Consolidate SliceTransform object ownership 2014-03-10 12:56:46 -07:00
skiplist_test.cc Clean up arena API 2014-01-30 22:10:10 -08:00
snapshot.h Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
table_cache.cc Minimize accessing multiple objects in Version::Get() 2014-04-17 14:14:00 -07:00
table_cache.h Merge branch 'master' into columnfamilies 2014-04-07 11:31:11 -07:00
table_properties_collector.cc Extract metaindex block from block-based table 2013-12-05 16:34:16 -08:00
table_properties_collector.h Extract metaindex block from block-based table 2013-12-05 16:34:16 -08:00
table_properties_collector_test.cc Turn on -Wmissing-prototypes 2014-04-09 21:17:14 -07:00
tailing_iter.cc RocksDBLite 2014-04-15 13:39:26 -07:00
tailing_iter.h RocksDBLite 2014-04-15 13:39:26 -07:00
transaction_log_impl.cc RocksDBLite 2014-04-15 13:39:26 -07:00
transaction_log_impl.h RocksDBLite 2014-04-15 13:39:26 -07:00
version_edit.cc Merge branch 'master' into columnfamilies 2014-03-31 13:39:24 -07:00
version_edit.h Minimize accessing multiple objects in Version::Get() 2014-04-17 14:14:00 -07:00
version_edit_test.cc [CF] Dont reuse dropped column family IDs 2014-03-05 12:13:44 -08:00
version_set.cc Minimize accessing multiple objects in Version::Get() 2014-04-17 14:14:00 -07:00
version_set.h Minimize accessing multiple objects in Version::Get() 2014-04-17 14:14:00 -07:00
version_set_test.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
write_batch.cc [CF] WriteBatch to take in ColumnFamilyHandle 2014-03-14 11:30:14 -07:00
write_batch_internal.h [CF] Code cleanup part 1 2014-03-12 09:56:53 -07:00
write_batch_test.cc Change WriteBatch interface 2014-03-14 13:40:06 -07:00