mirror of https://github.com/facebook/rocksdb.git
db_bench: fix hang on IO error (#5300)
Summary: db_bench will wait indefinitely if there's background error. Fix by pass `abs_time_us` to cond var. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5300 Differential Revision: D15319945 Pulled By: miasantreble fbshipit-source-id: 0034fb7f6ec7c3303c4ccf26e54c20fbdac8ab44
This commit is contained in:
parent
e626016545
commit
92c60547fe
|
@ -2102,10 +2102,10 @@ class Benchmark {
|
|||
cv_.SignalAll();
|
||||
}
|
||||
|
||||
bool WaitForRecovery(uint64_t /*abs_time_us*/) {
|
||||
bool WaitForRecovery(uint64_t abs_time_us) {
|
||||
InstrumentedMutexLock l(&mutex_);
|
||||
if (!recovery_complete_) {
|
||||
cv_.Wait(/*abs_time_us*/);
|
||||
cv_.TimedWait(abs_time_us);
|
||||
}
|
||||
if (recovery_complete_) {
|
||||
recovery_complete_ = false;
|
||||
|
|
Loading…
Reference in New Issue