mirror of https://gitee.com/bigwinds/arangodb
Bug fix/gharial rm vertex smart fix (#8622)
This commit is contained in:
parent
bccd2f3d58
commit
7a44359bb0
|
@ -1,6 +1,9 @@
|
|||
devel
|
||||
-----
|
||||
|
||||
* fixed internal issue #3815: fixed the removal of connected edges when
|
||||
removing a vertex graph node in a smart graph environment.
|
||||
|
||||
* show startup warning in case kernel setting `vm.overcommit_memory` is set
|
||||
to a value of 2 and the jemalloc memory allocator is in use. This combination
|
||||
does not play well together.
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "Transaction/Methods.h"
|
||||
#include "Transaction/SmartContext.h"
|
||||
#include "Transaction/StandaloneContext.h"
|
||||
#include "Utils/CollectionNameResolver.h"
|
||||
#include "Utils/ExecContext.h"
|
||||
#include "Utils/OperationOptions.h"
|
||||
#include "Utils/SingleCollectionTransaction.h"
|
||||
|
@ -783,8 +784,15 @@ OperationResult GraphOperations::removeEdgeOrVertex(const std::string& collectio
|
|||
|
||||
trxCollections.emplace_back(collectionName);
|
||||
|
||||
CollectionNameResolver resolver {_vocbase};
|
||||
for (auto const& it : edgeCollections) {
|
||||
trxCollections.emplace_back(it);
|
||||
auto col = resolver.getCollection(it);
|
||||
if (col && col->isSmart() && col->type() == TRI_COL_TYPE_EDGE) {
|
||||
for (auto const& rn : col->realNames()) {
|
||||
trxCollections.emplace_back(rn);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto const& it : possibleEdgeCollections) {
|
||||
trxCollections.emplace_back(it); // add to trx collections
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <utility>
|
||||
|
||||
#include "Aql/Query.h"
|
||||
#include "Basics/StringUtils.h"
|
||||
#include "Basics/VelocyPackHelper.h"
|
||||
#include "Graph/Graph.h"
|
||||
#include "Graph/GraphManager.h"
|
||||
|
@ -57,7 +58,9 @@ Result RestGraphHandler::executeGharial() {
|
|||
auto suffix = request()->suffixes().begin();
|
||||
auto end = request()->suffixes().end();
|
||||
|
||||
auto getNextSuffix = [&suffix]() { return *suffix++; };
|
||||
auto getNextSuffix = [&suffix]() {
|
||||
return basics::StringUtils::urlDecodePath(*suffix++);
|
||||
};
|
||||
|
||||
auto noMoreSuffixes = [&suffix, &end]() { return suffix == end; };
|
||||
|
||||
|
|
Loading…
Reference in New Issue