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
block_based
cuckoo
plain
block_fetcher.cc
block_fetcher.h
block_fetcher_test.cc
cleanable_test.cc
format.cc
format.h
get_context.cc
get_context.h
internal_iterator.h
iter_heap.h
iterator.cc
iterator_wrapper.h
merger_test.cc
merging_iterator.cc
merging_iterator.h
meta_blocks.cc
meta_blocks.h
mock_table.cc
mock_table.h
multiget_context.h
persistent_cache_helper.cc
persistent_cache_helper.h
persistent_cache_options.h
scoped_arena_iterator.h
sst_file_dumper.cc
sst_file_dumper.h
sst_file_reader.cc
sst_file_reader_test.cc
sst_file_writer.cc
sst_file_writer_collectors.h
table_builder.h
table_factory.cc
table_properties.cc
table_properties_internal.h
table_reader.h
table_reader_bench.cc
table_test.cc
two_level_iterator.cc
two_level_iterator.h
unique_id.cc
unique_id_impl.h