10000 Bug fix/begin trx disjoint (#14641) by mchacki · Pull Request #14648 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Bug fix/begin trx disjoint (#14641) #14648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
v3.8.1 (XXXX-XX-XX)
-------------------

* Fixed: _api/transaction/begin called on edge collections of disjoint
SmartGraphs falsely returned CollectionNotFound errors.

* Bug-Fix: In more complex queries there was a code-path where a (Disjoint-)
Smart graph access was not properly optimized.

Expand Down
20 changes: 11 additions & 9 deletions arangod/Transaction/Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,15 +489,17 @@ Result Manager::lockCollections(TRI_vocbase_t& vocbase,
if (res.fail()) {
return false;
}
res.reset(state->addCollection(theEdge->getFromCid(), "_from_" + cname,
mode, /*lockUsage*/ false));
if (res.fail()) {
return false;
}
res.reset(state->addCollection(theEdge->getToCid(), "_to_" + cname,
mode, /*lockUsage*/ false));
if (res.fail()) {
return false;
if (!col->isDisjoint()) {
res.reset(state->addCollection(theEdge->getFromCid(), "_from_" + cname,
mode, /*lockUsage*/ false));
if (res.fail()) {
return false;
}
res.reset(state->addCollection(theEdge->getToCid(), "_to_" + cname,
mode, /*lockUsage*/ false));
if (res.fail()) {
return false;
}
}
}
} catch (basics::Exception const& ex) {
Expand Down
0