mirror of https://gitee.com/bigwinds/arangodb
Do not crash when agency dump is unsuccessful.
This commit is contained in:
parent
a4bdb9c960
commit
0d1572c24a
|
@ -1171,8 +1171,12 @@ int ClusterInfo::createCollectionCoordinator(std::string const& databaseName,
|
||||||
<< "\njson: " << json.toString()
|
<< "\njson: " << json.toString()
|
||||||
<< "\ntransaction sent to agency: " << transaction.toJson();
|
<< "\ntransaction sent to agency: " << transaction.toJson();
|
||||||
AgencyCommResult ag = ac.getValues("");
|
AgencyCommResult ag = ac.getValues("");
|
||||||
|
if (ag.successful()) {
|
||||||
LOG_TOPIC(ERR, Logger::CLUSTER) << "Agency dump:\n"
|
LOG_TOPIC(ERR, Logger::CLUSTER) << "Agency dump:\n"
|
||||||
<< ag.slice().toJson();
|
<< ag.slice().toJson();
|
||||||
|
} else {
|
||||||
|
LOG_TOPIC(ERR, Logger::CLUSTER) << "Could not get agency dump!";
|
||||||
|
}
|
||||||
events::CreateCollection(name, TRI_ERROR_CLUSTER_TIMEOUT);
|
events::CreateCollection(name, TRI_ERROR_CLUSTER_TIMEOUT);
|
||||||
return setErrormsg(TRI_ERROR_CLUSTER_TIMEOUT, errorMsg);
|
return setErrormsg(TRI_ERROR_CLUSTER_TIMEOUT, errorMsg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue