rocksdb/env
Andrew Kryczka e373685dab Add SystemClock::TimedWait() function (#11753)
Summary:
Having a synthetic implementation of `TimedWait()` in `SystemClock` will allow us to add `SyncPoint`s while mutex is released, which was previously impossible since the lock was released and reacquired all within `pthread_cond_timedwait()`. Additionally, integrating `TimedWait()` with `MockSystemClock` allows us to cleanup some workarounds in the test code. In this PR I only cleaned up the `GenericRateLimiter` test workaround.

This is related to the intended follow-up mentioned in https://github.com/facebook/rocksdb/issues/7101's description. There are a couple differences:

(1) This PR does not include removing the particular workaround that initially motivated it. Actually, the `Timer` class uses `InstrumentedCondVar`, so the interface introduced here is inadequate to remove that workaround. On the bright side, the interface introduced in this PR can be changed as needed since it can neither be used nor extended externally, due to using forward-declared `port::CondVar*` in the interface.
(2) This PR only makes the change in `SystemClock` not `Env`. Older revisions of this PR included `Env::TimedWait()` and `SpecialEnv::TimedWait()`; however, since they were unused it probably makes sense to defer adding them until when they are needed.

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

Reviewed By: pdillinger

Differential Revision: D48654995

Pulled By: ajkr

fbshipit-source-id: 15e19f2454b64d4ec7f50e328691c66ca9911122
2023-08-29 18:39:10 -07:00
..
composite_env.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
composite_env_wrapper.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
emulated_clock.h Make SystemClock into a Customizable Class (#8636) 2021-09-21 09:23:48 -07:00
env.cc Add SystemClock::TimedWait() function (#11753) 2023-08-29 18:39:10 -07:00
env_basic_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_chroot.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_chroot.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_encryption.cc remove duplicate comments in EncryptedEnv (#11549) 2023-06-27 11:55:37 -07:00
env_encryption_ctr.h remove duplicate comments in EncryptedEnv (#11549) 2023-06-27 11:55:37 -07:00
env_posix.cc Fix error case memory bug in GetHostName() (#11544) 2023-06-16 11:47:19 -07:00
env_test.cc format_version=6 and context-aware block checksums (#9058) 2023-07-30 16:40:01 -07:00
file_system.cc Remove FactoryFunc from LoadXXXObject (#11203) 2023-02-17 12:54:07 -08:00
file_system_tracer.cc Provide support for IOTracing for ReadAsync API (#9833) 2022-05-25 19:47:03 -07:00
file_system_tracer.h Provide support for IOTracing for ReadAsync API (#9833) 2022-05-25 19:47:03 -07:00
fs_posix.cc Add an interface to provide support for underlying FS to pass their own buffer during reads (#11324) 2023-06-23 11:48:49 -07:00
fs_readonly.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
fs_remap.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
fs_remap.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
io_posix.cc Run clang-format on env/ folder (#10859) 2022-10-24 17:54:14 -07:00
io_posix.h Added placeholders for MADV defines (#10881) 2022-11-02 14:42:42 -07:00
io_posix_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
mock_env.cc Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
mock_env.h Run clang-format on env/ folder (#10859) 2022-10-24 17:54:14 -07:00
mock_env_test.cc Run clang-format on env/ folder (#10859) 2022-10-24 17:54:14 -07:00
unique_id_gen.cc Internal API for generating semi-random salt (#11331) 2023-06-21 11:32:49 -07:00
unique_id_gen.h Internal API for generating semi-random salt (#11331) 2023-06-21 11:32:49 -07:00