rocksdb/db
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
..
.nfs00000000066c9ebb00000002 Enhance db_bench 2013-03-14 16:00:23 -07:00
builder.cc Made merge_oprator a shared_ptr; and added TTL unit tests 2013-08-20 13:35:28 -07:00
builder.h [RocksDB] cleanup EnvOptions 2013-06-12 11:17:19 -07:00
c.cc Fix poor error on num_levels mismatch and few other minor improvements 2013-01-25 15:37:26 -08:00
c_test.c Fix poor error on num_levels mismatch and few other minor improvements 2013-01-25 15:37:26 -08:00
corruption_test.cc Make arena block size configurable 2013-07-31 12:42:23 -07:00
db_bench.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
db_filesnapshot.cc API for getting archived log files 2013-08-19 13:37:04 -07:00
db_impl.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
db_impl.h Add APIs to query SST file metadata and to delete specific SST files 2013-08-22 15:27:19 -07:00
db_impl_readonly.cc [RocksDB] [MergeOperator] The new Merge Interface! Uses merge sequences. 2013-08-05 20:14:32 -07:00
db_impl_readonly.h [RocksDB] [MergeOperator] The new Merge Interface! Uses merge sequences. 2013-08-05 20:14:32 -07:00
db_iter.cc Made merge_oprator a shared_ptr; and added TTL unit tests 2013-08-20 13:35:28 -07:00
db_iter.h [Rocksdb] Support Merge operation in rocksdb 2013-05-03 16:59:02 -07:00
db_statistics.h Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
db_stats_logger.cc remove boost 2012-09-16 19:33:43 -07:00
db_test.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
dbformat.cc [RocksDB] Expose thread local perf counter for low overhead, per call level performance statistics. 2013-08-14 15:24:06 -07:00
dbformat.h Implement log blobs 2013-08-14 16:32:46 -07:00
dbformat_test.cc Fix all warnings generated by -Wall option to the compiler. 2012-11-06 14:07:31 -08:00
deletefile_test.cc Add APIs to query SST file metadata and to delete specific SST files 2013-08-22 15:27:19 -07:00
filename.cc API for getting archived log files 2013-08-19 13:37:04 -07:00
filename.h Added meta-database support. 2012-12-17 11:26:59 -08:00
filename_test.cc Added meta-database support. 2012-12-17 11:26:59 -08:00
log_format.h Fixed sign-comparison in rocksdb code-base and fixed Makefile 2013-03-19 14:35:23 -07:00
log_reader.cc Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
log_reader.h TransactionLogIter should stall at the last record. Currently it errors out 2013-03-21 15:12:35 -07:00
log_test.cc Fix more signed-unsigned comparisons 2013-03-19 17:21:36 -07:00
log_writer.cc Fix a number of object lifetime/ownership issues 2013-01-23 16:54:11 -08:00
log_writer.h Fix a number of object lifetime/ownership issues 2013-01-23 16:54:11 -08:00
memtable.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
memtable.h Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
memtablelist.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00
memtablelist.h [RocksDB] [MergeOperator] The new Merge Interface! Uses merge sequences. 2013-08-05 20:14:32 -07:00
merge_helper.cc Merge operator fixes part 1. 2013-08-19 11:42:47 -07:00
merge_helper.h Counter for merge failure 2013-08-13 14:25:42 -07:00
merge_operator.cc Merge operator fixes part 1. 2013-08-19 11:42:47 -07:00
merge_test.cc Made merge_oprator a shared_ptr; and added TTL unit tests 2013-08-20 13:35:28 -07:00
perf_context.cc [RocksDB] Expose thread local perf counter for low overhead, per call level performance statistics. 2013-08-14 15:24:06 -07:00
perf_context_test.cc [RocksDB] Expose thread local perf counter for low overhead, per call level performance statistics. 2013-08-14 15:24:06 -07:00
prefix_filter_iterator.h Prefix filters for scans (v4) 2013-08-13 14:04:56 -07:00
repair.cc Merge branch 'master' into performance 2013-08-02 10:22:08 -07:00
skiplist.h Make arena block size configurable 2013-07-31 12:42:23 -07:00
skiplist_test.cc Make arena block size configurable 2013-07-31 12:42:23 -07:00
snapshot.h [RocksDB] fix compaction filter trigger condition 2013-05-13 12:33:02 -07:00
table_cache.cc Revert "Prefix scan: db_bench and bug fixes" 2013-08-22 18:01:11 -07:00
table_cache.h Revert "Prefix scan: db_bench and bug fixes" 2013-08-22 18:01:11 -07:00
transaction_log_impl.cc API for getting archived log files 2013-08-19 13:37:04 -07:00
transaction_log_impl.h API for getting archived log files 2013-08-19 13:37:04 -07:00
version_edit.cc Merge remote-tracking branch 'origin' into performance 2013-08-12 09:58:50 -07:00
version_edit.h Merge remote-tracking branch 'origin' into performance 2013-08-12 09:58:50 -07:00
version_edit_test.cc Reduce write amplification by merging files in L0 back into L0 2013-06-30 20:07:04 -07:00
version_set.cc Revert "Prefix scan: db_bench and bug fixes" 2013-08-22 18:01:11 -07:00
version_set.h Revert "Prefix scan: db_bench and bug fixes" 2013-08-22 18:01:11 -07:00
version_set_reduce_num_levels.cc Fix valgrind errors in rocksdb tests: auto_roll_logger_test, reduce_levels_test 2013-03-12 16:03:16 -07:00
version_set_test.cc Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
write_batch.cc Allow WriteBatch::Handler to abort iteration 2013-08-21 18:27:48 -07:00
write_batch_internal.h Use KeyMayExist for WriteBatch-Deletes 2013-07-23 13:36:50 -07:00
write_batch_test.cc Add three new MemTableRep's 2013-08-22 23:10:02 -07:00