rocksdb/util
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
..
arena_impl.cc Make arena block size configurable 2013-07-31 12:42:23 -07:00
arena_impl.h Make arena block size configurable 2013-07-31 12:42:23 -07:00
arena_test.cc Make arena block size configurable 2013-07-31 12:42:23 -07:00
auto_roll_logger_test.cc [RocksDB] Fix PosixLogger and AutoRollLogger thread safety 2013-05-21 11:39:44 -07:00
auto_roll_logger.cc [RocksDB] Fix PosixLogger and AutoRollLogger thread safety 2013-05-21 11:39:44 -07:00
auto_roll_logger.h [RocksDB] Fix PosixLogger and AutoRollLogger thread safety 2013-05-21 11:39:44 -07:00
bit_set.h [Rocksdb] Implement filluniquerandom 2013-06-14 16:17:56 -07:00
bloom_test.cc Fix all warnings generated by -Wall option to the compiler. 2012-11-06 14:07:31 -08:00
bloom.cc Fix all the lint errors. 2012-11-28 17:18:41 -08:00
build_version.h Stop continually re-creating build_version.c 2013-01-24 17:51:39 -08:00
cache_test.cc [RocksDB] Fix LRUCache Eviction problem 2013-04-04 11:22:50 -07:00
cache.cc [RocksDB] Fix LRUCache Eviction problem 2013-04-04 11:22:50 -07:00
coding_test.cc Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
coding.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
coding.h Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
comparator.cc merge 1.5 2012-08-28 11:43:33 -07:00
crc32c_test.cc Fix all warnings generated by -Wall option to the compiler. 2012-11-06 14:07:31 -08:00
crc32c.cc Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
crc32c.h A number of fixes: 2011-10-31 17:22:06 +00:00
env_hdfs.cc Ability to configure bufferedio-reads, filesystem-readaheads and mmap-read-write per database. 2013-03-20 23:14:03 -07:00
env_posix.cc [RocksDB] Add mmap_read option for db_stress 2013-06-19 10:28:32 -07:00
env_test.cc [RocksDB] cleanup EnvOptions 2013-06-12 11:17:19 -07:00
env.cc [RocksDB] Option for incremental sync 2013-06-18 15:00:32 -07:00
filelock_test.cc Prevent concurrent multiple opens of leveldb database. 2012-08-20 23:55:04 -07:00
filter_policy.cc Added bloom filter support. 2012-04-17 08:36:46 -07:00
hash.cc A number of fixes: 2011-10-31 17:22:06 +00:00
hash.h reverting disastrous MOE commit, returning to r21 2011-04-19 23:11:15 +00:00
histogram_test.cc Introduce histogram in statistics.h 2013-02-20 10:43:32 -08:00
histogram.cc [Rocksdb] Remove unused double apis to record into histograms 2013-05-16 10:40:30 -07:00
histogram.h [Rocksdb] Remove unused double apis to record into histograms 2013-05-16 10:40:30 -07:00
ldb_cmd_execute_result.h Enhanced ldb to support data access commands 2013-01-28 11:38:26 -08:00
ldb_cmd.cc Merge remote-tracking branch 'origin' into performance 2013-08-12 09:58:50 -07:00
ldb_cmd.h [RocksDB] Improve manifest dump to print internal keys in hex for version edits. 2013-08-08 16:19:01 -07:00
ldb_tool.cc [RocksDB] Support internal key/value dump for ldb 2013-07-03 10:41:31 -07:00
logging.cc Fix all warnings generated by -Wall option to the compiler. 2012-11-06 14:07:31 -08:00
logging.h A number of fixes: 2011-10-31 17:22:06 +00:00
manual_compaction_test.cc [rocksdb] do not trim range for level0 in manual compaction 2013-06-17 13:58:17 -07:00
murmurhash.cc Implement RowLocks for assoc schema 2012-10-03 23:19:01 -07:00
murmurhash.h Implement RowLocks for assoc schema 2012-10-03 23:19:01 -07:00
mutexlock.h Implement ReadWrite locks for leveldb 2012-10-01 22:37:39 -07:00
options.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
posix_logger.h [RocksDB] Fix PosixLogger and AutoRollLogger thread safety 2013-05-21 11:39:44 -07:00
random.h [RocksDB] Include 64bit random number generator 2013-06-04 13:52:27 -07:00
signal_test.cc [RocksDB] fix build 2013-04-20 10:26:51 -07:00
skiplistrep.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
slice.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
stack_trace.h [RocksDB] Add stacktrace signal handler 2013-04-20 10:26:50 -07:00
statistics.cc [rocksdb][refactor] statistic printing code to one place 2013-06-18 20:28:41 -07:00
stats_logger.h Clean up compiler warnings generated by -Wall option. 2012-08-29 14:24:51 -07:00
status.cc [Rocksdb] Support Merge operation in rocksdb 2013-05-03 16:59:02 -07:00
stl_wrappers.h Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
stop_watch.h [RocksDB] Simplify StopWatch implementation 2013-05-17 10:55:34 -07:00
string_util.cc Ability to set different size fanout multipliers for every level. 2013-05-21 13:50:20 -07:00
string_util.h Ability to set different size fanout multipliers for every level. 2013-05-21 13:50:20 -07:00
testharness.cc Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
testharness.h A number of fixes: 2011-10-31 17:22:06 +00:00
testutil.cc Fix all warnings generated by -Wall option to the compiler. 2012-11-06 14:07:31 -08:00
testutil.h Ability to configure bufferedio-reads, filesystem-readaheads and mmap-read-write per database. 2013-03-20 23:14:03 -07:00
transformrep.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
vectorrep.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00