8000 Indexes backward compatibility broken in 3.5+ · Issue #11275 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Indexes backward compatibility broken in 3.5+ #11275

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

Closed
soualid opened this issue Mar 16, 2020 · 2 comments
Closed

Indexes backward compatibility broken in 3.5+ #11275

soualid opened this issue Mar 16, 2020 · 2 comments
Milestone

Comments

@soualid
Copy link
Contributor
soualid commented Mar 16, 2020

Hello,

Using a single server database, it seems that since the 3.5 series, an unique index set on a subfield of a document could lead to a crash during updates if this field has a null value stored in the database.

See the repro below, which is reproducible using a fresh arandodb 3.5.4 docker image (haven't tested this on the 3.6 serie yet).

db._drop('repro')
db._createDocumentCollection('repro')
db.repro.ensureIndex({fields:['nativeIdentity.emailAddress'], type: 'hash', unique: true})
db.repro.insert([
  {
    "nativeIdentity": null
  }
])
db._query('for r in repro update r with { anotherField: "test2" } in repro')

Will return the following error:

JavaScript exception in file '/usr/share/arangodb3/js/client/modules/@arangodb/arangosh.js' at 99,7: ArangoError 4: Expecting Object (while executing) (exception location: /work/ArangoDB/arangod/RestHandler/RestCursorHandler.cpp:283). Please report this error to arangodb.com
!      throw error;
!      ^
stacktrace: ArangoError: Expecting Object (while executing) (exception location: /work/ArangoDB/arangod/RestHandler/RestCursorHandler.cpp:283). Please report this error to arangodb.com
    at Object.exports.checkRequestResult (/usr/share/arangodb3/js/client/modules/@arangodb/arangosh.js:97:21)
    at ArangoStatement.execute (/usr/share/arangodb3/js/client/modules/@arangodb/arango-statement.js:172:12)
    at Proxy.ArangoDatabase._query (/usr/share/arangodb3/js/client/modules/@arangodb/arango-database.js:954:45)

This is breaking backward compatibility because such updates worked in previous versions and consequently, making the update process a bit risky if we have to analyze all the datas stored in the database to avoid this case.

Thank you for your feedbacks on this!

@jsteemann
Copy link
Contributor

Just verified it and can confirm that there is this behavior change in 3.5. And that 3.6 and 3.7 are also affected by this issue. 3.4 is not.

jsteemann added a commit that referenced this issue Mar 18, 2020
jsteemann added a commit that referenced this issue Mar 18, 2020
jsteemann added a commit that referenced this issue Mar 18, 2020
@jsteemann jsteemann added 1 Bug 2 Fixed Resolution and removed 1 Analyzing labels Mar 18, 2020
@jsteemann jsteemann added this to the 3.5.5 milestone Mar 18, 2020
KVS85 added a commit that referenced this issue Mar 19, 2020
* fixed issue #11275

* added test, fixed it

Co-authored-by: KVS85 <vadim@arangodb.com>
KVS85 added a commit that referenced this issue Mar 19, 2020
* fixed issue #11275

* added test, fixed it

Co-authored-by: KVS85 <vadim@arangodb.com>
KVS85 pushed a commit that referenced this issue Mar 19, 2020
* fixed issue #11275

* added test, fixed it

* fix CHANGELOG entry
@maxkernbach
Copy link
Contributor

Hi @soualid,

Version 3.5.5, which includes a fix for this issue, has been released.

From the Changelog:

Please find the latest release in the download section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0