1
0
Fork 0

Improve timings for hotbackup lock. (#10230)

This commit is contained in:
Max Neunhöffer 2019-10-11 16:42:12 +02:00 committed by KVS85
parent e4e53b94ee
commit ff28647627
1 changed files with 4 additions and 4 deletions

View File

@ -4169,7 +4169,7 @@ arangodb::Result hotBackupCoordinator(VPackSlice const payload, VPackBuilder& re
}
std::vector<ServerID> dbServers = ci->getCurrentDBServers();
std::vector<ServerID> lockedServers;
double lockWait(0.1);
double lockWait(1);
while (cc != nullptr && steady_clock::now() < end) {
result = lockDBServerTransactions(backupId, dbServers, lockWait, lockedServers);
if (!result.ok()) {
@ -4182,10 +4182,10 @@ arangodb::Result hotBackupCoordinator(VPackSlice const payload, VPackBuilder& re
} else {
break;
}
if (lockWait < 30.0) {
lockWait *= 1.25;
if (lockWait < 3600.0) {
lockWait *= 1.5;
}
std::this_thread::sleep_for(seconds(1));
std::this_thread::sleep_for(milliseconds(300));
}
bool gotLocks = result.ok();