mirror of https://gitee.com/bigwinds/arangodb
fixed smg collections within the transaction, added gharial decoding (#8621)
This commit is contained in:
parent
86599ee2fc
commit
6b1d56a62c
|
@ -1,3 +1,10 @@
|
|||
v3.4.6 (2019-XX-XX)
|
||||
-------------------
|
||||
|
||||
* fixed internal issue #3815: fixed the removal of connected edges when
|
||||
removing a vertex graph node in a smart graph environment.
|
||||
|
||||
|
||||
v3.4.5 (2019-03-27)
|
||||
-------------------
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "RestServer/QueryRegistryFeature.h"
|
||||
#include "Transaction/Methods.h"
|
||||
#include "Transaction/SmartContext.h"
|
||||
#include "Utils/CollectionNameResolver.h"
|
||||
#include "Utils/ExecContext.h"
|
||||
#include "Utils/OperationOptions.h"
|
||||
#include "Utils/SingleCollectionTransaction.h"
|
||||
|
@ -776,8 +777,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
|
||||
|
@ -787,6 +795,7 @@ OperationResult GraphOperations::removeEdgeOrVertex(const std::string& collectio
|
|||
transaction::Options trxOptions;
|
||||
trxOptions.waitForSync = waitForSync;
|
||||
auto context = ctx();
|
||||
|
||||
UserTransaction trx{context, {}, trxCollections, {}, trxOptions};
|
||||
|
||||
res = trx.begin();
|
||||
|
|
|
@ -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