mirror of https://gitee.com/bigwinds/arangodb
if collection is gone in meantine ... (#9331)
This commit is contained in:
parent
7d822355b3
commit
b97a62c0de
|
@ -2873,6 +2873,11 @@ int ClusterInfo::ensureIndexCoordinatorInner(std::string const& databaseName,
|
||||||
// Finally check if it has appeared, if not, we take another turn,
|
// Finally check if it has appeared, if not, we take another turn,
|
||||||
// which does not do any harm:
|
// which does not do any harm:
|
||||||
auto coll = getCollection(databaseName, collectionID);
|
auto coll = getCollection(databaseName, collectionID);
|
||||||
|
if (coll == nullptr) {
|
||||||
|
errorMsg = "The collection has gone. Aborting index creation";
|
||||||
|
return TRI_ERROR_ARANGO_INDEX_CREATION_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
auto indexes = coll->getIndexes();
|
auto indexes = coll->getIndexes();
|
||||||
if (std::any_of(indexes.begin(), indexes.end(),
|
if (std::any_of(indexes.begin(), indexes.end(),
|
||||||
[indexId](std::shared_ptr<arangodb::Index>& index) -> bool {
|
[indexId](std::shared_ptr<arangodb::Index>& index) -> bool {
|
||||||
|
|
Loading…
Reference in New Issue