mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-27 20:43:57 +00:00
Merge pull request #287 from yinqiwen/rate-limiter-crash-fix
fix rate limiter crash #286
This commit is contained in:
commit
9b8480d93b
|
@ -60,7 +60,7 @@ GenericRateLimiter::~GenericRateLimiter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericRateLimiter::Request(int64_t bytes, const Env::IOPriority pri) {
|
void GenericRateLimiter::Request(int64_t bytes, const Env::IOPriority pri) {
|
||||||
assert(bytes < refill_bytes_per_period_);
|
assert(bytes <= refill_bytes_per_period_);
|
||||||
|
|
||||||
MutexLock g(&request_mutex_);
|
MutexLock g(&request_mutex_);
|
||||||
if (stop_) {
|
if (stop_) {
|
||||||
|
|
Loading…
Reference in a new issue