c1bb32e1ba
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 |
||
---|---|---|
.. | ||
block_builder.cc | ||
block_builder.h | ||
block.cc | ||
block.h | ||
filter_block_test.cc | ||
filter_block.cc | ||
filter_block.h | ||
format.cc | ||
format.h | ||
iterator_wrapper.h | ||
iterator.cc | ||
merger.cc | ||
merger.h | ||
table_builder.cc | ||
table_test.cc | ||
table.cc | ||
two_level_iterator.cc | ||
two_level_iterator.h |