6083bc79f8
Summary: Introducing blob_db::TTLExtractor to replace extract_ttl_fn. The TTL extractor can be use to extract TTL from keys insert with Put or WriteBatch. Change over existing extract_ttl_fn are: * If value is changed, it will be return via std::string* (rather than Slice*). With Slice* the new value has to be part of the existing value. With std::string* the limitation is removed. * It can optionally return TTL or expiration. Other changes in this PR: * replace `std::chrono::system_clock` with `Env::NowMicros` so that I can mock time in tests. * add several TTL tests. * other minor naming change. Closes https://github.com/facebook/rocksdb/pull/2659 Differential Revision: D5512627 Pulled By: yiwu-arbug fbshipit-source-id: 0dfcb00d74d060b8534c6130c808e4d5d0a54440 |
||
---|---|---|
.. | ||
blob_db_impl.cc | ||
blob_db_impl.h | ||
blob_db_options_impl.cc | ||
blob_db_options_impl.h | ||
blob_db_test.cc | ||
blob_db.cc | ||
blob_db.h | ||
blob_dump_tool.cc | ||
blob_dump_tool.h | ||
blob_file.cc | ||
blob_log_format.cc | ||
blob_log_format.h | ||
blob_log_reader.cc | ||
blob_log_reader.h | ||
blob_log_writer.cc | ||
blob_log_writer.h | ||
ttl_extractor.cc | ||
ttl_extractor.h |