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
|
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
|
* 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
|
to a value of 2 and the jemalloc memory allocator is in use. This combination
|
||||||
does not play well together.
|
does not play well together.
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "Transaction/Methods.h"
|
#include "Transaction/Methods.h"
|
||||||
#include "Transaction/SmartContext.h"
|
#include "Transaction/SmartContext.h"
|
||||||
#include "Transaction/StandaloneContext.h"
|
#include "Transaction/StandaloneContext.h"
|
||||||
|
#include "Utils/CollectionNameResolver.h"
|
||||||
#include "Utils/ExecContext.h"
|
#include "Utils/ExecContext.h"
|
||||||
#include "Utils/OperationOptions.h"
|
#include "Utils/OperationOptions.h"
|
||||||
#include "Utils/SingleCollectionTransaction.h"
|
#include "Utils/SingleCollectionTransaction.h"
|
||||||
|
@ -783,8 +784,15 @@ OperationResult GraphOperations::removeEdgeOrVertex(const std::string& collectio
|
||||||
|
|
||||||
trxCollections.emplace_back(collectionName);
|
trxCollections.emplace_back(collectionName);
|
||||||
|
|
||||||
|
CollectionNameResolver resolver {_vocbase};
|
||||||
for (auto const& it : edgeCollections) {
|
for (auto const& it : edgeCollections) {
|
||||||
trxCollections.emplace_back(it);
|
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) {
|
for (auto const& it : possibleEdgeCollections) {
|
||||||
trxCollections.emplace_back(it); // add to trx collections
|
trxCollections.emplace_back(it); // add to trx collections
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "Aql/Query.h"
|
#include "Aql/Query.h"
|
||||||
|
#include "Basics/StringUtils.h"
|
||||||
#include "Basics/VelocyPackHelper.h"
|
#include "Basics/VelocyPackHelper.h"
|
||||||
#include "Graph/Graph.h"
|
#include "Graph/Graph.h"
|
||||||
#include "Graph/GraphManager.h"
|
#include "Graph/GraphManager.h"
|
||||||
|
@ -57,7 +58,9 @@ Result RestGraphHandler::executeGharial() {
|
||||||
auto suffix = request()->suffixes().begin();
|
auto suffix = request()->suffixes().begin();
|
||||||
auto end = request()->suffixes().end();
|
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; };
|
auto noMoreSuffixes = [&suffix, &end]() { return suffix == end; };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue