rocksdb/test_util
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
..
mock_time_env.cc Add a SystemClock class to capture the time functions of an Env (#7858) 2021-01-25 22:09:11 -08:00
mock_time_env.h Add SystemClock::TimedWait() function (#11753) 2023-08-29 18:39:10 -07:00
secondary_cache_test_util.cc HyperClockCache support for SecondaryCache, with refactoring (#11301) 2023-03-17 20:23:49 -07:00
secondary_cache_test_util.h Placeholder for AutoHyperClockCache, more (#11692) 2023-08-11 16:27:38 -07:00
sync_point.cc clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
sync_point.h Document SyncPoint::LoadDependency (#11477) 2023-05-24 16:49:17 -07:00
sync_point_impl.cc clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
sync_point_impl.h clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
testharness.cc clang format files under test_util/ (#10855) 2022-10-24 20:32:25 -07:00
testharness.h Changes and enhancements to compression stats, thresholds (#11388) 2023-04-21 21:57:40 -07:00
testutil.cc format_version=6 and context-aware block checksums (#9058) 2023-07-30 16:40:01 -07:00
testutil.h Add a UDT comparator for ReverseBytewiseComparator to object library (#11647) 2023-07-27 15:31:22 -07:00
testutil_test.cc More Makefile Cleanup (#7097) 2020-07-09 14:35:17 -07:00
transaction_test_util.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_test_util.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00