rocksdb/table
Igor Canadi 26f5dd9a5a TablePropertiesCollectorFactory
Summary:
This diff addresses task #4296714 and rethinks how users provide us with TablePropertiesCollectors as part of Options.

Here's description of task #4296714:
       I'm debugging #4295529 and noticed that our count of user properties kDeletedKeys is wrong. We're sharing one single InternalKeyPropertiesCollector with all Table Builders. In LOG Files, we're outputting number of kDeletedKeys as connected with a single table, while it's actually the total count of deleted keys since creation of the DB.

       For example, this table has 3155 entries and 1391828 deleted keys.

The problem with current approach that we call methods on a single TablePropertiesCollector for all the tables we create. Even worse, we could do it from multiple threads at the same time and TablePropertiesCollector has no way of knowing which table we're calling it for.

Good part: Looks like nobody inside Facebook is using Options::table_properties_collectors. This means we should be able to painfully change the API.

In this change, I introduce TablePropertiesCollectorFactory. For every table we create, we call `CreateTablePropertiesCollector`, which creates a TablePropertiesCollector for a single table. We then use it sequentially from a single thread, which means it doesn't have to be thread-safe.

Test Plan:
Added a test in table_properties_collector_test that fails on master (build two tables, assert that kDeletedKeys count is correct for the second one).
Also, all other tests

Reviewers: sdong, dhruba, haobo, kailiu

Reviewed By: kailiu

CC: leveldb

Differential Revision: https://reviews.facebook.net/D18579
2014-05-13 12:30:55 -07:00
..
block_based_table_builder.cc TablePropertiesCollectorFactory 2014-05-13 12:30:55 -07:00
block_based_table_builder.h TablePropertiesCollectorFactory 2014-05-13 12:30:55 -07:00
block_based_table_factory.cc Make the block-based table's index pluggable 2014-02-28 18:19:07 -08:00
block_based_table_factory.h Remove the terrible hack in for flush_block_policy_factory 2014-02-28 16:39:27 -08:00
block_based_table_reader.cc xxHash 2014-05-01 14:09:32 -04:00
block_based_table_reader.h Fix OSX compile 2014-04-26 17:15:43 -04:00
block_builder.cc [Performance Branch] PlainTable to encode rows with seqID 0, value type using 1 internal byte. 2014-02-03 12:19:30 -08:00
block_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
block_hash_index_test.cc Add a hash-index component for block 2014-03-03 21:11:49 -08:00
block_hash_index.cc Add a hash-index component for block 2014-03-03 21:11:49 -08:00
block_hash_index.h Add a hash-index component for block 2014-03-03 21:11:49 -08:00
block_test.cc Enable hash index for block-based table 2014-04-10 14:19:43 -07:00
block.cc Enable hash index for block-based table 2014-04-10 14:19:43 -07:00
block.h Enable hash index for block-based table 2014-04-10 14:19:43 -07:00
filter_block_test.cc [Performance Branch] PlainTable to encode rows with seqID 0, value type using 1 internal byte. 2014-02-03 12:19:30 -08:00
filter_block.cc Consolidate SliceTransform object ownership 2014-03-10 12:56:46 -07:00
filter_block.h [CF] Rethinking ColumnFamilyHandle and fix to dropping column families 2014-02-12 13:47:09 -08:00
flush_block_policy.cc Remove the terrible hack in for flush_block_policy_factory 2014-02-28 16:39:27 -08:00
format.cc Fix iOS compile 2014-05-07 17:48:31 -07:00
format.h xxHash 2014-05-01 14:09:32 -04:00
iter_heap.h Turn on -Wmissing-prototypes 2014-04-09 21:17:14 -07:00
iterator_wrapper.h MergingIterator uses autovector instead of vector 2014-05-08 15:01:20 -07:00
iterator.cc Add appropriate LICENSE and Copyright message. 2013-10-16 17:48:41 -07:00
merger.cc MergingIterator uses autovector instead of vector 2014-05-08 15:01:20 -07:00
merger.h Remove env_ from MergingIterator 2014-04-08 13:40:42 -07:00
meta_blocks.cc TablePropertiesCollectorFactory 2014-05-13 12:30:55 -07:00
meta_blocks.h TablePropertiesCollectorFactory 2014-05-13 12:30:55 -07:00
plain_table_builder.cc TablePropertiesCollectorFactory 2014-05-13 12:30:55 -07:00
plain_table_builder.h TablePropertiesCollectorFactory 2014-05-13 12:30:55 -07:00
plain_table_factory.cc Revert "Revert "Allow allocating dynamic bloom, plain table indexes and hash linked list from huge page TLB"" 2014-05-04 13:56:29 -07:00
plain_table_factory.h PlainTableFactory::PlainTableFactory() to have huge TLB turned off by default 2014-05-05 11:05:54 -07:00
plain_table_reader.cc Pass logger to memtable rep and TLB page allocation error logged to info logs 2014-05-05 16:43:37 -07:00
plain_table_reader.h Revert "Revert "Allow allocating dynamic bloom, plain table indexes and hash linked list from huge page TLB"" 2014-05-04 13:56:29 -07:00
table_builder.h First phase API clean up 2014-02-03 00:30:43 -08:00
table_properties.cc Fix SIGFAULT when running sst_dump on v2.6 db 2014-04-21 17:49:47 -07:00
table_reader_bench.cc Fix more gflag namespace issues 2014-05-09 08:41:02 -07:00
table_reader.h avoid calling FindFile twice in TwoLevelIterator for PlainTable 2014-04-25 12:23:07 -07:00
table_test.cc xxHash 2014-05-01 14:09:32 -04:00
two_level_iterator.cc avoid calling FindFile twice in TwoLevelIterator for PlainTable 2014-04-25 12:23:07 -07:00
two_level_iterator.h avoid calling FindFile twice in TwoLevelIterator for PlainTable 2014-04-25 12:23:07 -07:00