rocksdb/table
Dhruba Borthakur c1bb32e1ba Trigger read compaction only if seeks to storage are incurred.
Summary:
In the current code, a Get() call can trigger compaction if it has to look at more than one file. This causes unnecessary compaction because looking at more than one file is a penalty only if the file is not yet in the cache. Also, th current code counts these files before the bloom filter check is applied.

This patch counts a 'seek' only if the file fails the bloom filter
check and has to read in data block(s) from the storage.

This patch also counts a 'seek' if a file is not present in the file-cache, because opening a file means that its index blocks need to be read into cache.

Test Plan: unit test attached. I will probably add one more unti tests.

Reviewers: heyongqiang

Reviewed By: heyongqiang

CC: MarkCallaghan

Differential Revision: https://reviews.facebook.net/D5709
2012-09-28 11:10:52 -07:00
..
block_builder.cc A number of fixes: 2011-10-31 17:22:06 +00:00
block_builder.h A number of fixes: 2011-10-31 17:22:06 +00:00
block.cc Added bloom filter support. 2012-04-17 08:36:46 -07:00
block.h Added bloom filter support. 2012-04-17 08:36:46 -07:00
filter_block_test.cc Added bloom filter support. 2012-04-17 08:36:46 -07:00
filter_block.cc Added bloom filter support. 2012-04-17 08:36:46 -07:00
filter_block.h Added bloom filter support. 2012-04-17 08:36:46 -07:00
format.cc add bzip2 compression 2012-06-29 10:27:28 -07:00
format.h Added bloom filter support. 2012-04-17 08:36:46 -07:00
iterator_wrapper.h sync with upstream @21627589 2011-06-02 00:00:37 +00:00
iterator.cc A number of fixes: 2011-10-31 17:22:06 +00:00
merger.cc A number of fixes: 2011-10-31 17:22:06 +00:00
merger.h A number of fixes: 2011-10-31 17:22:06 +00:00
table_builder.cc Clean up compiler warnings generated by -Wall option. 2012-08-29 14:24:51 -07:00
table_test.cc add bzip2 compression 2012-06-29 10:27:28 -07:00
table.cc Trigger read compaction only if seeks to storage are incurred. 2012-09-28 11:10:52 -07:00
two_level_iterator.cc A number of fixes: 2011-10-31 17:22:06 +00:00
two_level_iterator.h A number of fixes: 2011-10-31 17:22:06 +00:00