rocksdb/table
Yanqin Jin 7d26e4c5a3 Basic Support for Merge with user-defined timestamp (#10819)
Summary:
This PR implements the originally disabled `Merge()` APIs when user-defined timestamp is enabled.

Simplest usage:
```cpp
// assume string append merge op is used with '.' as delimiter.
// ts1 < ts2
db->Put(WriteOptions(), "key", ts1, "v0");
db->Merge(WriteOptions(), "key", ts2, "1");
ReadOptions ro;
ro.timestamp = &ts2;
db->Get(ro, "key", &value);
ASSERT_EQ("v0.1", value);
```

Some code comments are added for clarity.

Note: support for timestamp in `DB::GetMergeOperands()` will be done in a follow-up PR.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10819

Test Plan: make check

Reviewed By: ltamasi

Differential Revision: D40603195

Pulled By: riversand963

fbshipit-source-id: f96d6f183258f3392d80377025529f7660503013
2022-10-31 22:28:58 -07:00
..
adaptive Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
block_based Fix deletion counting in memtable stats (#10886) 2022-10-28 17:03:44 -07:00
cuckoo Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
plain Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
block_fetcher.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
block_fetcher.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
block_fetcher_test.cc Make MemoryAllocator into a Customizable class (#8980) 2021-12-17 04:20:47 -08:00
cleanable_test.cc Eliminate unnecessary (slow) block cache Ref()ing in MultiGet (#9899) 2022-04-26 21:59:24 -07:00
format.cc Refactor to avoid confusing "raw block" (#10408) 2022-09-22 11:25:32 -07:00
format.h Refactor to avoid confusing "raw block" (#10408) 2022-09-22 11:25:32 -07:00
get_context.cc Basic Support for Merge with user-defined timestamp (#10819) 2022-10-31 22:28:58 -07:00
get_context.h User-defined timestamp support for `DeleteRange()` (#10661) 2022-09-30 16:13:03 -07:00
internal_iterator.h Skip swaths of range tombstone covered keys in merging iterator (2022 edition) (#10449) 2022-09-02 09:51:19 -07:00
iter_heap.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
iterator.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
iterator_wrapper.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
merger_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
merging_iterator.cc Fix a Windows build error (#10897) 2022-10-28 14:24:48 -07:00
merging_iterator.h Fix memtable-only iterator regression (#10705) 2022-09-21 09:49:31 -07:00
meta_blocks.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
meta_blocks.h Refactor to avoid confusing "raw block" (#10408) 2022-09-22 11:25:32 -07:00
mock_table.cc Align compaction output file boundaries to the next level ones (#10655) 2022-09-29 19:43:55 -07:00
mock_table.h Align compaction output file boundaries to the next level ones (#10655) 2022-09-29 19:43:55 -07:00
multiget_context.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
persistent_cache_helper.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
persistent_cache_helper.h Refactor to avoid confusing "raw block" (#10408) 2022-09-22 11:25:32 -07:00
persistent_cache_options.h Use STATIC_AVOID_DESTRUCTION for static objects with non-trivial destructors (#9958) 2022-05-17 09:39:22 -07:00
scoped_arena_iterator.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
sst_file_dumper.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
sst_file_dumper.h Support using ZDICT_finalizeDictionary to generate zstd dictionary (#9857) 2022-05-20 12:09:09 -07:00
sst_file_reader.cc Remove range tombstone test code from sst_file_reader (#10847) 2022-10-23 20:17:14 -07:00
sst_file_reader_test.cc Remove range tombstone test code from sst_file_reader (#10847) 2022-10-23 20:17:14 -07:00
sst_file_writer.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
sst_file_writer_collectors.h Refactor to avoid confusing "raw block" (#10408) 2022-09-22 11:25:32 -07:00
table_builder.h Always verify SST unique IDs on SST file open (#10532) 2022-09-07 22:52:42 -07:00
table_factory.cc Restore Regex support for ObjectLibrary::Register, rename new APIs to allow old one to be deprecated in the future (#9362) 2022-01-11 06:33:48 -08:00
table_properties.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
table_properties_internal.h Improve / clean up meta block code & integrity (#9163) 2021-11-18 11:43:44 -08:00
table_reader.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
table_reader_bench.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
table_test.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
two_level_iterator.cc Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
two_level_iterator.h Format files under table/ by clang-format (#10852) 2022-10-25 11:50:38 -07:00
unique_id.cc Derive cache keys from SST unique IDs (#10394) 2022-08-12 13:49:49 -07:00
unique_id_impl.h Derive cache keys from SST unique IDs (#10394) 2022-08-12 13:49:49 -07:00