8000 Restrict hybrid disjoint sg directions by mchacki · Pull Request #16214 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Restrict hybrid disjoint sg directions #16214

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 16 commits into from
May 24, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Allow duplicate vertex results when fetching vertices from engines. O…
…n satellite collections we will get multiple responses from different servers.
  • Loading branch information
mchacki committed Apr 25, 2022
commit c25ae4bbacfa0fb508642ad570d80243a98505bd
27 changes: 15 additions & 12 deletions arangod/Cluster/ClusterMethods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2409,19 +2409,22 @@ void fetchVerticesFromEngines(
for (auto pair : VPackObjectIterator(resSlice, /*sequential*/ true)) {
arangodb::velocypack::HashedStringRef key(pair.key);
if (ADB_UNLIKELY(vertexIds.erase(key) == 0)) {
// We either found the same vertex twice,
// or found a vertex we did not request.
// Anyways something somewhere went seriously wrong
THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_GOT_CONTRADICTING_ANSWERS);
}

TRI_ASSERT(result.find(key) == result.end());
if (!cached) {
travCache.datalake().add(std::move(payload));
cached = true;
// This case is unlikely and can only happen for
// Satellite Vertex collections. There it is expected.
// If we fix above todo (fast-path) this case should
// be impossible.
TRI_ASSERT(result.find(key) != result.end());
TRI_ASSERT(VelocyPackHelper::equal(result.find(key)->second, pair.value,
true));
} else {
TRI_ASSERT(result.find(key) == result.end());
if (!cached) {
travCache.datalake().add(std::move(payload));
cached = true;
}
// Protected by datalake
result.try_emplace(key, pair.value);
}
// Protected by datalake
result.try_emplace(key, pair.value);
}
}

Expand Down
0