Andrew Kryczka e089db40f9 Skip bottom-level filter block caching when hit-optimized
Summary:
When Get() or NewIterator() trigger file loads, skip caching the filter block if
(1) optimize_filters_for_hits is set and (2) the file is on the bottommost
level. Also skip checking filters under the same conditions, which means that
for a preloaded file or a file that was trivially-moved to the bottom level, its
filter block will eventually expire from the cache.

- added parameters/instance variables in various places in order to propagate the config ("skip_filters") from version_set to block_based_table_reader
- in BlockBasedTable::Rep, this optimization prevents filter from being loaded when the file is opened simply by setting filter_policy = nullptr
- in BlockBasedTable::Get/BlockBasedTable::NewIterator, this optimization prevents filter from being used (even if it was loaded already) by setting filter = nullptr

Test Plan:
updated unit test:

  $ ./db_test --gtest_filter=DBTest.OptimizeFiltersForHits

will also run 'make check'

Reviewers: sdong, igor, paultuckfield, anthony, rven, kradhakrishnan, IslamAbdelRahman, yhchiang

Reviewed By: yhchiang

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D51633
2015-12-23 10:15:07 -08:00
..
2015-07-17 18:59:11 +02:00
2015-12-11 01:54:48 +09:00
2015-12-18 06:42:57 -08:00
2015-09-17 11:42:56 -07:00
2015-04-23 12:10:36 -07:00
2015-12-11 01:54:48 +09:00
2015-03-17 14:08:00 -07:00
2015-01-26 11:48:07 -08:00
2015-07-07 12:10:10 -07:00
2015-11-24 16:33:09 +03:00
2015-11-24 16:33:09 +03:00
2015-08-05 07:33:27 -07:00
2015-12-15 23:47:47 +08:00
2015-03-17 14:08:00 -07:00
2014-11-10 17:39:38 -05:00
2015-09-17 11:42:56 -07:00
2015-11-10 16:56:06 -08:00
2015-05-29 14:36:35 -07:00
2015-12-11 01:54:48 +09:00