1
0
Fork 0

corrected hot backup lock timings (#10076)

* corrected hot backup lock timings
* the lock timeout added to overall unlock timeout]
This commit is contained in:
Kaveh Vahedipour 2019-09-30 10:22:24 +02:00 committed by Max Neunhöffer
parent 2e293b85ca
commit bbe7d424d5
2 changed files with 10 additions and 13 deletions

View File

@ -1,6 +1,8 @@
devel
-----
* DB server locking / unlocking for hot backup revisited and enhanced
* Re-enabled the AQL sort-limit optimization rule in conjunction with fullCount
in the cluster. It now also may speed up fullCount with sorted indexes and a
limit.
@ -8,7 +10,7 @@ devel
* Fix config directory handling, so we don't trap into UNC path lookups on windows
* Prevent spurious log message "Scheduler queue is filled more than 50% in last x s"
from occurring when this is not the case. Due to a data race, the message could
from occurring when this is not the case. Due to a data race, the message could
previously also occur if the queue was empty.
* Make the scheduler enforce the configured queue lengths. The values of the options
@ -34,8 +36,8 @@ devel
* Add replicationFactor, minReplicationFactor and sharding strategy to database creation
dialog in web UI. Preselect database default values for collection creation in web UI.
* Add new JavaScipt function `db._properties()` and REST route GET
`/_api/database/properties` that provides information about the current database's
* Add new JavaScipt function `db._properties()` and REST route GET
`/_api/database/properties` that provides information about the current database's
properties.
* Add new options `sharding` and `replicationFactor` for database creation methods. The

View File

@ -3526,8 +3526,7 @@ arangodb::Result hotRestoreCoordinator(ClusterFeature& feature, VPackSlice const
return arangodb::Result();
}
std::vector<std::string> lockPath =
std::vector<std::string>{"result", "lockId"};
std::vector<std::string> lockPath = std::vector<std::string>{"result", "lockId"};
arangodb::Result lockDBServerTransactions(std::string const& backupId,
std::vector<ServerID> const& dbServers,
@ -3549,6 +3548,7 @@ arangodb::Result lockDBServerTransactions(std::string const& backupId,
VPackObjectBuilder o(&lock);
lock.add("id", VPackValue(backupId));
lock.add("timeout", VPackValue(lockWait));
lock.add("unlockTimeout", VPackValue(5.0 + lockWait));
}
LOG_TOPIC("707ed", DEBUG, Logger::BACKUP)
@ -3916,10 +3916,8 @@ arangodb::Result hotBackupCoordinator(ClusterFeature& feature, VPackSlice const
}
std::vector<ServerID> dbServers = ci.getCurrentDBServers();
std::vector<ServerID> lockedServers;
double lockWait = 2.0;
double lockWait(0.1);
while (cc != nullptr && steady_clock::now() < end) {
auto iterEnd = steady_clock::now() + duration<double>(lockWait);
result = lockDBServerTransactions(backupId, dbServers, lockWait, lockedServers);
if (!result.ok()) {
unlockDBServerTransactions(backupId, lockedServers);
@ -3931,12 +3929,9 @@ arangodb::Result hotBackupCoordinator(ClusterFeature& feature, VPackSlice const
break;
}
if (lockWait < 30.0) {
lockWait *= 1.1;
}
double tmp = duration<double>(iterEnd - steady_clock::now()).count();
if (tmp > 0) {
std::this_thread::sleep_for(duration<double>(tmp));
lockWait *= 1.25;
}
std::this_thread::sleep_for(seconds(1));
}
bool gotLocks = result.ok();