1
0
Fork 0

Reduce maximal timeout in exponential backoff when waiting for a lock.

This commit is contained in:
Max Neunhoeffer 2017-04-28 11:38:17 +02:00
parent 4f226547d9
commit 170942da4f
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}