rocksdb/table
Jim Paton 74781a0c49 Add three new MemTableRep's
Summary:
This patch adds three new MemTableRep's: UnsortedRep, PrefixHashRep, and VectorRep.

UnsortedRep stores keys in an std::unordered_map of std::sets. When an iterator is requested, it dumps the keys into an std::set and iterates over that.

VectorRep stores keys in an std::vector. When an iterator is requested, it creates a copy of the vector and sorts it using std::sort. The iterator accesses that new vector.

PrefixHashRep stores keys in an unordered_map mapping prefixes to ordered sets.

I also added one API change. I added a function MemTableRep::MarkImmutable. This function is called when the rep is added to the immutable list. It doesn't do anything yet, but it seems like that could be useful. In particular, for the vectorrep, it means we could elide the extra copy and just sort in place. The only reason I haven't done that yet is because the use of the ArenaAllocator complicates things (I can elaborate on this if needed).

Test Plan:
make -j32 check
./db_stress --memtablerep=vector
./db_stress --memtablerep=unsorted
./db_stress --memtablerep=prefixhash --prefix_size=10

Reviewers: dhruba, haobo, emayanke

Reviewed By: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D12117
2013-08-22 23:10:02 -07:00
..
block_builder.cc add block deviation option to terminate a block before it exceeds block_size 2013-05-24 15:52:49 -07:00
block_builder.h add block deviation option to terminate a block before it exceeds block_size 2013-05-24 15:52:49 -07:00
block_test.cc [RocksDB] Move table.h to table/ 2013-04-22 16:07:56 -07:00
block.cc [RocksDB] Refactor table.cc to reduce code duplication and improve readability. 2013-04-29 09:43:36 -07:00
block.h [RocksDB] Refactor table.cc to reduce code duplication and improve readability. 2013-04-29 09:43:36 -07:00
filter_block_test.cc Prefix filters for scans (v4) 2013-08-13 14:04:56 -07:00
filter_block.cc Revert "Prefix scan: db_bench and bug fixes" 2013-08-22 18:01:11 -07:00
filter_block.h Prefix filters for scans (v4) 2013-08-13 14:04:56 -07:00
format.cc [RocksDB] Refactor table.cc to reduce code duplication and improve readability. 2013-04-29 09:43:36 -07:00
format.h [RocksDB] Refactor table.cc to reduce code duplication and improve readability. 2013-04-29 09:43:36 -07:00
iter_heap.h Use a priority queue to merge files. 2013-01-02 13:52:25 -08:00
iterator_wrapper.h Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
iterator.cc Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
merger.cc [RocksDB] Minor iterator cleanup 2013-08-21 16:54:48 -07:00
merger.h A number of fixes: 2011-10-31 17:22:06 +00:00
table_builder.cc Prefix filters for scans (v4) 2013-08-13 14:04:56 -07:00
table_test.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
table.cc Revert "Prefix scan: db_bench and bug fixes" 2013-08-22 18:01:11 -07:00
table.h Revert "Prefix scan: db_bench and bug fixes" 2013-08-22 18:01:11 -07:00
two_level_iterator.cc [RocksDB] [Performance] Allow different posix advice to be applied to the same table file 2013-05-30 19:08:44 -07:00
two_level_iterator.h [RocksDB] [Performance] Allow different posix advice to be applied to the same table file 2013-05-30 19:08:44 -07:00