1
0
Fork 0

Do not crash when agency dump is unsuccessful.

This commit is contained in:
Frank Celler 2016-10-18 13:35:38 +00:00
parent a4bdb9c960
commit 0d1572c24a
1 changed files with 6 additions and 2 deletions

View File

@ -1171,8 +1171,12 @@ int ClusterInfo::createCollectionCoordinator(std::string const& databaseName,
<< "\njson: " << json.toString()
<< "\ntransaction sent to agency: " << transaction.toJson();
AgencyCommResult ag = ac.getValues("");
LOG_TOPIC(ERR, Logger::CLUSTER) << "Agency dump:\n"
<< ag.slice().toJson();
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!";
}
events::CreateCollection(name, TRI_ERROR_CLUSTER_TIMEOUT);
return setErrormsg(TRI_ERROR_CLUSTER_TIMEOUT, errorMsg);
}