rocksdb/table
Yanqin Jin 340ed4fac7 Add support for timestamp in Get/Put (#5079)
Summary:
It's useful to be able to (optionally) associate key-value pairs with user-provided timestamps. This PR is an early effort towards this goal and continues the work of facebook#4942. A suite of new unit tests exist in DBBasicTestWithTimestampWithParam. Support for timestamp requires the user to provide timestamp as a slice in `ReadOptions` and `WriteOptions`. All timestamps of the same database must share the same length, format, etc. The format of the timestamp is the same throughout the same database, and the user is responsible for providing a comparator function (Comparator) to order the <key, timestamp> tuples. Once created, the format and length of the timestamp cannot change (at least for now).

Test plan (on devserver):
```
$COMPILE_WITH_ASAN=1 make -j32 all
$./db_basic_test --gtest_filter=Timestamp/DBBasicTestWithTimestampWithParam.PutAndGet/*
$make check
```
All tests must pass.

We also run the following db_bench tests to verify whether there is regression on Get/Put while timestamp is not enabled.
```
$TEST_TMPDIR=/dev/shm ./db_bench -benchmarks=fillseq,readrandom -num=1000000
$TEST_TMPDIR=/dev/shm ./db_bench -benchmarks=fillrandom -num=1000000
```
Repeat for 6 times for both versions.

Results are as follows:
```
|        | readrandom | fillrandom |
| master | 16.77 MB/s | 47.05 MB/s |
| PR5079 | 16.44 MB/s | 47.03 MB/s |
```
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5079

Differential Revision: D15132946

Pulled By: riversand963

fbshipit-source-id: 833a0d657eac21182f0f206c910a6438154c742c
2019-06-05 23:10:47 -07:00
..
adaptive Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
block_based Add support for timestamp in Get/Put (#5079) 2019-06-05 23:10:47 -07:00
cuckoo Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
plain Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
block_fetcher.cc Move some logging related files to logging/ (#5387) 2019-05-31 17:23:59 -07:00
block_fetcher.h Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
bloom_block.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
bloom_block.h Disallow customized hash function in DynamicBloom (#4915) 2019-01-24 10:34:30 -08:00
cleanable_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
format.cc Move some logging related files to logging/ (#5387) 2019-05-31 17:23:59 -07:00
format.h Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
full_filter_bits_builder.h Skip duplicate bloom keys when whole_key and prefix are mixed 2018-04-24 10:58:16 -07:00
get_context.cc Add support for timestamp in Get/Put (#5079) 2019-06-05 23:10:47 -07:00
get_context.h Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
internal_iterator.h Reduce iterator key comparison for upper/lower bound check (#5111) 2019-05-17 10:28:31 -07:00
iter_heap.h Make InternalKeyComparator final and directly use it in merging iterator 2017-09-11 12:04:21 -07:00
iterator_wrapper.h Reduce iterator key comparison for upper/lower bound check (#5111) 2019-05-17 10:28:31 -07:00
iterator.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
merger_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
merging_iterator.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
merging_iterator.h Index value delta encoding (#3983) 2018-08-09 16:58:40 -07:00
meta_blocks.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
meta_blocks.h Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
mock_table.cc Refresh snapshot list during long compactions (2nd attempt) (#5278) 2019-05-03 17:30:22 -07:00
mock_table.h Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
multiget_context.h multiget: fix memory issues due to vector auto resizing (#5279) 2019-05-03 15:58:43 -07:00
persistent_cache_helper.cc Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
persistent_cache_helper.h Change RocksDB License 2017-07-15 16:11:23 -07:00
persistent_cache_options.h Change RocksDB License 2017-07-15 16:11:23 -07:00
scoped_arena_iterator.h Change RocksDB License 2017-07-15 16:11:23 -07:00
sst_file_reader_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
sst_file_reader.cc Fix SstFileReader not able to open ingested file (#5097) 2019-03-26 10:25:18 -07:00
sst_file_writer_collectors.h Fix SstFileReader not able to open ingested file (#5097) 2019-03-26 10:25:18 -07:00
sst_file_writer.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
table_builder.h Periodic Compactions (#5166) 2019-04-10 19:31:18 -07:00
table_properties_internal.h Index value delta encoding (#3983) 2018-08-09 16:58:40 -07:00
table_properties.cc Organizing rocksdb/table directory by format 2019-05-30 14:51:11 -07:00
table_reader_bench.cc Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
table_reader.h Comments for BlockBasedTable 2019-05-24 12:35:25 -07:00
table_test.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
two_level_iterator.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
two_level_iterator.h Index value delta encoding (#3983) 2018-08-09 16:58:40 -07:00