mirror of https://gitee.com/bigwinds/arangodb
waitFor will report more paranoid
This commit is contained in:
parent
adf3778f34
commit
150ff8a1e3
|
@ -178,7 +178,7 @@ bool Agent::waitFor(index_t index, double timeout) {
|
|||
|
||||
// timeout
|
||||
if (!_waitForCV.wait(static_cast<uint64_t>(1.0e6 * timeout))) {
|
||||
return false;
|
||||
return (_lastCommitIndex >= index);
|
||||
}
|
||||
|
||||
// shutting down
|
||||
|
|
|
@ -935,6 +935,7 @@ int ClusterInfo::createDatabaseCoordinator(std::string const& name,
|
|||
}
|
||||
|
||||
if (TRI_microtime() > endTime) {
|
||||
|
||||
return setErrormsg(TRI_ERROR_CLUSTER_TIMEOUT, errorMsg);
|
||||
}
|
||||
|
||||
|
@ -1012,6 +1013,14 @@ int ClusterInfo::dropDatabaseCoordinator(std::string const& name,
|
|||
}
|
||||
|
||||
if (TRI_microtime() > endTime) {
|
||||
AgencyCommResult ag = ac.getValues("/");
|
||||
if (ag.successful()) {
|
||||
LOG_TOPIC(ERR, Logger::CLUSTER) << "Agency dump:\n"
|
||||
<< ag.slice().toJson();
|
||||
} else {
|
||||
LOG_TOPIC(ERR, Logger::CLUSTER) << "Could not get agency dump!";
|
||||
}
|
||||
|
||||
return setErrormsg(TRI_ERROR_CLUSTER_TIMEOUT, errorMsg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue