rocksdb/table
Andres Noetzli 014fd55adc Support for SingleDelete()
Summary:
This patch fixes #7460559. It introduces SingleDelete as a new database
operation. This operation can be used to delete keys that were never
overwritten (no put following another put of the same key). If an overwritten
key is single deleted the behavior is undefined. Single deletion of a
non-existent key has no effect but multiple consecutive single deletions are
not allowed (see limitations).

In contrast to the conventional Delete() operation, the deletion entry is
removed along with the value when the two are lined up in a compaction. Note:
The semantics are similar to @igor's prototype that allowed to have this
behavior on the granularity of a column family (
https://reviews.facebook.net/D42093 ). This new patch, however, is more
aggressive when it comes to removing tombstones: It removes the SingleDelete
together with the value whenever there is no snapshot between them while the
older patch only did this when the sequence number of the deletion was older
than the earliest snapshot.

Most of the complex additions are in the Compaction Iterator, all other changes
should be relatively straightforward. The patch also includes basic support for
single deletions in db_stress and db_bench.

Limitations:
- Not compatible with cuckoo hash tables
- Single deletions cannot be used in combination with merges and normal
  deletions on the same key (other keys are not affected by this)
- Consecutive single deletions are currently not allowed (and older version of
  this patch supported this so it could be resurrected if needed)

Test Plan: make all check

Reviewers: yhchiang, sdong, rven, anthony, yoshinorim, igor

Reviewed By: igor

Subscribers: maykov, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D43179
2015-09-17 11:42:56 -07:00
..
adaptive_table_factory.cc Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
adaptive_table_factory.h Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
block_based_filter_block_test.cc rocksdb: switch to gtest 2015-03-17 14:08:00 -07:00
block_based_filter_block.cc Build for CYGWIN 2015-04-23 21:33:44 -07:00
block_based_filter_block.h Remember whole key/prefix filtering on/off in SST file 2015-02-11 11:20:04 -08:00
block_based_table_builder.cc Add ZSTD (not final format) compression type 2015-08-28 11:01:13 -07:00
block_based_table_builder.h Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
block_based_table_factory.cc Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
block_based_table_factory.h Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
block_based_table_reader.cc Optimize bloom filter cache misses 2015-09-02 15:36:47 -07:00
block_based_table_reader.h Optimize bloom filter cache misses 2015-09-02 15:36:47 -07:00
block_builder.cc Turn on -Wshorten-64-to-32 and fix all the errors 2014-11-11 16:47:22 -05:00
block_builder.h delete unused Comparator 2014-09-04 09:10:13 +08:00
block_hash_index_test.cc rocksdb: switch to gtest 2015-03-17 14:08:00 -07:00
block_hash_index.cc Windows Port from Microsoft 2015-07-01 16:13:56 -07:00
block_hash_index.h Turn on -Wshadow 2014-10-31 11:59:54 -07:00
block_prefix_index.cc Turn on -Wshorten-64-to-32 and fix all the errors 2014-11-11 16:47:22 -05:00
block_prefix_index.h Windows Port from Microsoft 2015-07-01 16:13:56 -07:00
block_test.cc rocksdb: switch to gtest 2015-03-17 14:08:00 -07:00
block.cc perf_context: report time spent on reading index and bloom blocks 2015-07-10 14:45:42 -07:00
block.h Use malloc_usable_size() for accounting block cache size 2015-06-26 11:48:09 -07:00
bloom_block.cc table/bloom_block.*: pass func parameter by reference 2014-09-30 23:30:31 +02:00
bloom_block.h Enforce write buffer memory limit across column families 2014-12-02 12:09:20 -08:00
cuckoo_table_builder_test.cc Block cuckoo table tests in ROCKSDB_LITE 2015-07-20 10:50:46 -07:00
cuckoo_table_builder.cc Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
cuckoo_table_builder.h Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
cuckoo_table_factory.cc Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
cuckoo_table_factory.h Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
cuckoo_table_reader_test.cc Skipped tests shouldn't be failures [part 2] 2015-09-15 22:59:53 -07:00
cuckoo_table_reader.cc Added Equal method to Comparator interface 2015-09-08 15:30:49 -07:00
cuckoo_table_reader.h Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
filter_block.h Dump routine to BlockBasedTableReader 2014-12-23 13:24:07 -08:00
flush_block_policy.cc move block based table related options BlockBasedTableOptions 2014-08-25 14:22:05 -07:00
format.cc Add ZSTD (not final format) compression type 2015-08-28 11:01:13 -07:00
format.h Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
full_filter_block_test.cc rocksdb: switch to gtest 2015-03-17 14:08:00 -07:00
full_filter_block.cc Remember whole key/prefix filtering on/off in SST file 2015-02-11 11:20:04 -08:00
full_filter_block.h Remember whole key/prefix filtering on/off in SST file 2015-02-11 11:20:04 -08:00
get_context.cc Support for SingleDelete() 2015-09-17 11:42:56 -07:00
get_context.h Implement a table-level row cache 2015-06-23 10:25:45 -07:00
iter_heap.h Replace std::priority_queue in MergingIterator with custom heap, take 2 2015-07-15 03:34:40 -07:00
iterator_wrapper.h Turn -Wshadow back on 2014-11-06 11:14:28 -08:00
iterator.cc rocksdb: Add missing override 2015-02-26 11:28:41 -08:00
merger_test.cc Fixed and simplified merge_helper 2015-07-17 09:27:24 -07:00
merger.cc Added Equal method to Comparator interface 2015-09-08 15:30:49 -07:00
merger.h In DB::NewIterator(), try to allocate the whole iterator tree in an arena 2014-06-02 17:44:57 -07:00
meta_blocks.cc Unified maps with Comparator for sorting, other cleanup 2015-09-02 13:58:22 -07:00
meta_blocks.h Unified maps with Comparator for sorting, other cleanup 2015-09-02 13:58:22 -07:00
mock_table.cc Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
mock_table.h Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
plain_table_builder.cc Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
plain_table_builder.h Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
plain_table_factory.cc Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
plain_table_factory.h Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
plain_table_index.cc "make format" against last 10 commits 2015-07-13 13:50:18 -07:00
plain_table_index.h Block plain_table_index.cc in ROCKSDB_LITE 2014-11-24 20:47:27 -08:00
plain_table_key_coding.cc Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
plain_table_key_coding.h Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
plain_table_reader.cc Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
plain_table_reader.h Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
table_builder.h Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
table_properties_internal.h Fix iOS compile with -Wshorten-64-to-32 2014-11-13 14:39:30 -05:00
table_properties.cc Expose per-level aggregated table properties via GetProperty() 2015-08-25 12:03:54 -07:00
table_reader_bench.cc Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
table_reader.h Add functionality to pre-fetch blocks specified by a key range to BlockBasedTable implementation. 2015-03-02 17:07:03 -08:00
table_test.cc Refactor NewTableReader to accept TableReaderOptions 2015-09-11 11:36:33 -07:00
two_level_iterator.cc Allocate LevelFileIteratorState and LevelFileNumIterator from DB iterator's arena 2015-06-30 17:30:38 -07:00
two_level_iterator.h Allocate LevelFileIteratorState and LevelFileNumIterator from DB iterator's arena 2015-06-30 17:30:38 -07:00