rocksdb/table
Yu Zhang d1ae7f6c41 Add support to strip / pad timestamp when writing / reading a block (#11472)
Summary:
This patch adds support in `BlockBuilder` to strip user-defined timestamp from the `key` added via `Add(key, value)` and its equivalent APIs. The stripping logic is different when the key is either a user key or an internal key, so the `BlockBuilder` is created with a flag to indicate that. This patch also add support on the read path to APIs `NewIndexIterator`, `NewDataIterator` to support pad a min timestamp.

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

Test Plan:
Three test modes are added to parameterize existing tests:
UserDefinedTimestampTestMode::kNone -> UDT feature is not enabled
UserDefinedTimestampTestMode::kNormal -> UDT feature enabled, write / read with min timestamp
UserDefinedTimestampTestMode::kStripUserDefinedTimestamps -> UDT feature enabled, write / read with min timestamp, set `persist_user_defined_timestamps` where it applies to false.
The tests read/write with min timestamp so that point read and range scan can correctly read values in all three test modes.

`block_test` are parameterized to run with above three test modes and some additional parameteriazation

```
make all check
./block_test --gtest_filter="P/BlockTest*"
./block_test --gtest_filter="P/IndexBlockTest*"
```

Reviewed By: ltamasi

Differential Revision: D46200539

Pulled By: jowlyzhang

fbshipit-source-id: 59f5d6b584639976b69c2943eba723bd47d9b3c0
2023-05-25 15:41:32 -07:00
..
adaptive
block_based Add support to strip / pad timestamp when writing / reading a block (#11472) 2023-05-25 15:41:32 -07:00
cuckoo Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
plain Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
block_fetcher.cc Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
block_fetcher.h Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
block_fetcher_test.cc Record and use the tail size to prefetch table tail (#11406) 2023-05-08 13:14:28 -07:00
cleanable_test.cc
compaction_merging_iterator.cc
compaction_merging_iterator.h
format.cc Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
format.h Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
get_context.cc Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
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 Record and use the tail size to prefetch table tail (#11406) 2023-05-08 13:14:28 -07:00
meta_blocks.h Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
mock_table.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
mock_table.h
multiget_context.h
persistent_cache_helper.cc
persistent_cache_helper.h Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
persistent_cache_options.h Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
scoped_arena_iterator.h
sst_file_dumper.cc Block per key-value checksum (#11287) 2023-04-25 12:08:23 -07:00
sst_file_dumper.h
sst_file_reader.cc Block per key-value checksum (#11287) 2023-04-25 12:08:23 -07:00
sst_file_reader_test.cc
sst_file_writer.cc validate SstFileWriter range tombstones cover positive ranges (#11322) 2023-03-22 21:03:13 -07:00
sst_file_writer_collectors.h
table_builder.h Record and use the tail size to prefetch table tail (#11406) 2023-05-08 13:14:28 -07:00
table_factory.cc
table_properties.cc Record and use the tail size to prefetch table tail (#11406) 2023-05-08 13:14:28 -07:00
table_properties_internal.h
table_reader.h Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
table_reader_bench.cc Block per key-value checksum (#11287) 2023-04-25 12:08:23 -07:00
table_test.cc Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
two_level_iterator.cc
two_level_iterator.h
unique_id.cc
unique_id_impl.h