mirror of https://gitee.com/bigwinds/arangodb
Reduce maximal timeout in exponential backoff when waiting for a lock.
This commit is contained in:
parent
4f226547d9
commit
170942da4f
|
@ -2453,7 +2453,7 @@ int MMFilesCollection::lockRead(bool useDeadlockDetector, double timeout) {
|
|||
std::this_thread::yield();
|
||||
} else {
|
||||
usleep(static_cast<TRI_usleep_t>(waitTime));
|
||||
if (waitTime < 500000) {
|
||||
if (waitTime < 32) {
|
||||
waitTime *= 2;
|
||||
}
|
||||
}
|
||||
|
@ -2566,7 +2566,7 @@ int MMFilesCollection::lockWrite(bool useDeadlockDetector, double timeout) {
|
|||
std::this_thread::yield();
|
||||
} else {
|
||||
usleep(static_cast<TRI_usleep_t>(waitTime));
|
||||
if (waitTime < 500000) {
|
||||
if (waitTime < 32) {
|
||||
waitTime *= 2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1316,7 +1316,7 @@ int RocksDBCollection::lockWrite(double timeout) {
|
|||
std::this_thread::yield();
|
||||
} else {
|
||||
usleep(static_cast<TRI_usleep_t>(waitTime));
|
||||
if (waitTime < 500000) {
|
||||
if (waitTime < 32) {
|
||||
waitTime *= 2;
|
||||
}
|
||||
}
|
||||
|
@ -1367,7 +1367,7 @@ int RocksDBCollection::lockRead(double timeout) {
|
|||
std::this_thread::yield();
|
||||
} else {
|
||||
usleep(static_cast<TRI_usleep_t>(waitTime));
|
||||
if (waitTime < 500000) {
|
||||
if (waitTime < 32) {
|
||||
waitTime *= 2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue