rocksdb/table/block_based
mrambacher 12f1137355 Add a SystemClock class to capture the time functions of an Env (#7858)
Summary:
Introduces and uses a SystemClock class to RocksDB.  This class contains the time-related functions of an Env and these functions can be redirected from the Env to the SystemClock.

Many of the places that used an Env (Timer, PerfStepTimer, RepeatableThread, RateLimiter, WriteController) for time-related functions have been changed to use SystemClock instead.  There are likely more places that can be changed, but this is a start to show what can/should be done.  Over time it would be nice to migrate most (if not all) of the uses of the time functions from the Env to the SystemClock.

There are several Env classes that implement these functions.  Most of these have not been converted yet to SystemClock implementations; that will come in a subsequent PR.  It would be good to unify many of the Mock Timer implementations, so that they behave similarly and be tested similarly (some override Sleep, some use a MockSleep, etc).

Additionally, this change will allow new methods to be introduced to the SystemClock (like https://github.com/facebook/rocksdb/issues/7101 WaitFor) in a consistent manner across a smaller number of classes.

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

Reviewed By: pdillinger

Differential Revision: D26006406

Pulled By: mrambacher

fbshipit-source-id: ed10a8abbdab7ff2e23d69d85bd25b3e7e899e90
2021-01-25 22:09:11 -08:00
..
binary_search_index_reader.cc
binary_search_index_reader.h
block.cc
block.h
block_based_filter_block.cc Exclude timestamp from prefix extractor (#7668) 2020-12-01 14:07:15 -08:00
block_based_filter_block.h Exclude timestamp from prefix extractor (#7668) 2020-12-01 14:07:15 -08:00
block_based_filter_block_test.cc
block_based_table_builder.cc Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
block_based_table_builder.h
block_based_table_factory.cc
block_based_table_factory.h
block_based_table_iterator.cc
block_based_table_iterator.h Exclude timestamp from prefix extractor (#7668) 2020-12-01 14:07:15 -08:00
block_based_table_reader.cc Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
block_based_table_reader.h Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
block_based_table_reader_impl.h
block_based_table_reader_test.cc Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
block_builder.cc
block_builder.h
block_prefetcher.cc
block_prefetcher.h
block_prefix_index.cc
block_prefix_index.h
block_test.cc
block_type.h
cachable_entry.h
data_block_footer.cc
data_block_footer.h
data_block_hash_index.cc
data_block_hash_index.h
data_block_hash_index_test.cc Make StringEnv, StringSink, StringSource use FS classes (#7786) 2021-01-04 16:01:01 -08:00
filter_block.h Exclude timestamp from prefix extractor (#7668) 2020-12-01 14:07:15 -08:00
filter_block_reader_common.cc
filter_block_reader_common.h
filter_policy.cc Migrate away from Travis+Linux+amd64 (#7791) 2020-12-22 00:20:57 -08:00
filter_policy_internal.h Support optimize_filters_for_memory for Ribbon filter (#7774) 2020-12-18 14:31:03 -08:00
flush_block_policy.cc
flush_block_policy.h
full_filter_block.cc Exclude timestamp from prefix extractor (#7668) 2020-12-01 14:07:15 -08:00
full_filter_block.h Exclude timestamp from prefix extractor (#7668) 2020-12-01 14:07:15 -08:00
full_filter_block_test.cc Use size_t for filter APIs, protect against overflow (#7726) 2020-12-11 22:18:12 -08:00
hash_index_reader.cc
hash_index_reader.h
index_builder.cc
index_builder.h
index_reader_common.cc
index_reader_common.h
mock_block_based_table.h
parsed_full_filter_block.cc
parsed_full_filter_block.h
partitioned_filter_block.cc Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
partitioned_filter_block.h
partitioned_filter_block_test.cc
partitioned_index_iterator.cc
partitioned_index_iterator.h
partitioned_index_reader.cc Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
partitioned_index_reader.h
reader_common.cc
reader_common.h
uncompression_dict_reader.cc
uncompression_dict_reader.h