rocksdb/table
Deon Nicholas c2d7826ced [RocksDB] [MergeOperator] The new Merge Interface! Uses merge sequences.
Summary:
Here are the major changes to the Merge Interface. It has been expanded
to handle cases where the MergeOperator is not associative. It does so by stacking
up merge operations while scanning through the key history (i.e.: during Get() or
Compaction), until a valid Put/Delete/end-of-history is encountered; it then
applies all of the merge operations in the correct sequence starting with the
base/sentinel value.

I have also introduced an "AssociativeMerge" function which allows the user to
take advantage of associative merge operations (such as in the case of counters).
The implementation will always attempt to merge the operations/operands themselves
together when they are encountered, and will resort to the "stacking" method if
and only if the "associative-merge" fails.

This implementation is conjectured to allow MergeOperator to handle the general
case, while still providing the user with the ability to take advantage of certain
efficiencies in their own merge-operator / data-structure.

NOTE: This is a preliminary diff. This must still go through a lot of review,
revision, and testing. Feedback welcome!

Test Plan:
  -This is a preliminary diff. I have only just begun testing/debugging it.
  -I will be testing this with the existing MergeOperator use-cases and unit-tests
(counters, string-append, and redis-lists)
  -I will be "desk-checking" and walking through the code with the help gdb.
  -I will find a way of stress-testing the new interface / implementation using
db_bench, db_test, merge_test, and/or db_stress.
  -I will ensure that my tests cover all cases: Get-Memtable,
Get-Immutable-Memtable, Get-from-Disk, Iterator-Range-Scan, Flush-Memtable-to-L0,
Compaction-L0-L1, Compaction-Ln-L(n+1), Put/Delete found, Put/Delete not-found,
end-of-history, end-of-file, etc.
  -A lot of feedback from the reviewers.

Reviewers: haobo, dhruba, zshao, emayanke

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D11499
2013-08-05 20:14:32 -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 Fix all warnings generated by -Wall option to the compiler. 2012-11-06 14:07:31 -08:00
filter_block.cc Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
filter_block.h Added bloom filter support. 2012-04-17 08:36:46 -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 Codemod NULL to nullptr 2013-02-28 18:04:58 -08:00
merger.h A number of fixes: 2011-10-31 17:22:06 +00:00
table_builder.cc [Rocksdb] Record WriteBlock Times into a histogram 2013-06-17 10:11:10 -07:00
table_test.cc Virtualize SkipList Interface 2013-07-23 14:42:27 -07:00
table.cc [RocksDB] [MergeOperator] The new Merge Interface! Uses merge sequences. 2013-08-05 20:14:32 -07:00
table.h Expand KeyMayExist to return the proper value if it can be found in memory and also check block_cache 2013-08-01 09:07:46 -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