8000 Fix BTS-548 array index wrong optimization by neunhoef · Pull Request #14779 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Fix BTS-548 array ind 8000 ex wrong optimization #14779

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 6 commits into from
Sep 23, 2021
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
Next Next commit
Fix attributesEqual for update/replace array index changes.
  • Loading branch information
neunhoef committed Sep 15, 2021
commit a1cea3d9466e6249a7c57231bef1544c9d1a43d6
9 changes: 9 additions & 0 deletions arangod/RocksDBEngine/RocksDBVPackIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,15 @@ namespace {

if (begin->shouldExpand &&
first.isArray() && second.isArray()) {
if (first.length() != second.length()) {
// Nonequal length, so there is a difference!
// We have to play this carefully here. It is possible that the
// set of values found is the same, but we must err on the side
// of caution in this case and use the slow path. Note in
// particular that the following code returns `true`, if one
// of the arrays is empty, which is not correct!
return false;
}
auto next = begin + 1;
VPackArrayIterator it1(first), it2(second);
while (it1.valid() && it2.valid()) {
Expand Down
0