mirror of https://gitee.com/bigwinds/arangodb
fix restoring of smart graph edge collections so it does not time out (#5048)
This commit is contained in:
parent
ae0b99de63
commit
b96250b57a
|
@ -1,6 +1,8 @@
|
|||
v3.3.6 (XXXX-XX-XX)
|
||||
-------------------
|
||||
|
||||
* fix restoring of smart graph edge collections (may have run into timeout before)
|
||||
|
||||
* added ArangoShell helper function for packaging all information about an
|
||||
AQL query so it can be run and analyzed elsewhere:
|
||||
|
||||
|
|
|
@ -1145,7 +1145,7 @@ int ClusterInfo::createCollectionCoordinator(std::string const& databaseName,
|
|||
|
||||
std::string const name =
|
||||
arangodb::basics::VelocyPackHelper::getStringValue(json, "name", "");
|
||||
|
||||
|
||||
{
|
||||
// check if a collection with the same name is already planned
|
||||
loadPlan();
|
||||
|
@ -1260,7 +1260,7 @@ int ClusterInfo::createCollectionCoordinator(std::string const& databaseName,
|
|||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
// ATTENTION: The following callback calls the above closure in a
|
||||
// different thread. Nevertheless, the closure accesses some of our
|
||||
// local variables. Therefore we have to protect all accesses to them
|
||||
|
@ -1350,8 +1350,14 @@ int ClusterInfo::createCollectionCoordinator(std::string const& databaseName,
|
|||
// Update our cache:
|
||||
loadPlan();
|
||||
}
|
||||
|
||||
bool isSmart = false;
|
||||
VPackSlice smartSlice = json.get("isSmart");
|
||||
if (smartSlice.isBool() && smartSlice.getBool()) {
|
||||
isSmart = true;
|
||||
}
|
||||
|
||||
if (numberOfShards == 0) {
|
||||
if (numberOfShards == 0 || isSmart) {
|
||||
loadCurrent();
|
||||
events::CreateCollection(name, TRI_ERROR_NO_ERROR);
|
||||
return TRI_ERROR_NO_ERROR;
|
||||
|
|
Loading…
Reference in New Issue