mirror of https://github.com/facebook/rocksdb.git
e373685dab
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 |
||
---|---|---|
.. | ||
composite_env.cc | ||
composite_env_wrapper.h | ||
emulated_clock.h | ||
env.cc | ||
env_basic_test.cc | ||
env_chroot.cc | ||
env_chroot.h | ||
env_encryption.cc | ||
env_encryption_ctr.h | ||
env_posix.cc | ||
env_test.cc | ||
file_system.cc | ||
file_system_tracer.cc | ||
file_system_tracer.h | ||
fs_posix.cc | ||
fs_readonly.h | ||
fs_remap.cc | ||
fs_remap.h | ||
io_posix.cc | ||
io_posix.h | ||
io_posix_test.cc | ||
mock_env.cc | ||
mock_env.h | ||
mock_env_test.cc | ||
unique_id_gen.cc | ||
unique_id_gen.h |