10000 AQL: Expecting Array slice [node #6: IndexNode] ? · Issue #19168 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

AQL: Expecting Array slice [node #6: IndexNode] ? #19168

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

Open
papaslumpf opened this issue Jun 2, 2023 · 5 comments
Open

AQL: Expecting Array slice [node #6: IndexNode] ? #19168

papaslumpf opened this issue Jun 2, 2023 · 5 comments
Labels
1 Bug 2 Fixed Resolution 3 AQL Query language related 3 Index

Comments

@papaslumpf
Copy link
papaslumpf commented Jun 2, 2023

My Environment

  • ArangoDB Version: 3.11.0
  • Deployment Mode: Single Server
  • Deployment Strategy: Manual Start in Docker

Component, Query & Data

Affected feature:
AQL query throws error

AQL query (if applicable):

FOR tp IN TEAM_PROVIDER
FILTER tp.providerID IN ["v3-820","v3-845","v3-838","v3-10043","v3-12666","v3-815"] && tp._to=="xxx/xxx"
RETURN tp

AQL explain and/or profile (if applicable):

Steps to reproduce

  1. run the query

Problem:
Query: AQL: Expecting Array slice [node #6: IndexNode] (exception location: /work/ArangoDB/arangod/Aql/ExecutionBlockImpl.tpp:505). Please report this error to arangodb.com (while executing) (exception location: /work/ArangoDB/arangod/RestHandler/RestCursorHandler.cpp:279). Please report this error to arangodb.com

Error only occurs when FILTERed by both attributes. Removing any one of the two FILTER attributes lets the query run as expected
Changing the order of the filtered attributes doesn't change anything.
Using a second FILTER instead of && doesn't change anything

Using POSITION(anyArray, search, returnIndex) instead of search IN anyArray works as expected

Expected result:

@papaslumpf papaslumpf changed the title Query: AQL: Expecting Array slice [node #6: IndexNode] (exception location: /work/ArangoDB/arangod/Aql/ExecutionBlockImpl.tpp:505) AQL: Expecting Array slice [node #6: IndexNode] ? Jun 2, 2023
@nashikb
Copy link
nashikb commented Jul 6, 2023

I'm also able to reproduce this issue, which along with #19264 caused us to shut down our upgraded production database and restore it into a new ArangoCloud instance created with 3.10.8. 👁️

Similar to the reported query, performing an IN fails if there's a unique index on the FILTERed field:

FOR thing IN things
    FILTER thing.uuid IN [
        "1be85c49-cbb7-4dda-a16b-fe7593ad0f71", "b3aeaa7d-e293-4624-8605-0e95b9fbaea2",
        "6528c047-df79-4cf6-a411-f17030cfabc9", "1db8b8da-17d4-4375-b37d-8114662fa91c",
        "88fdc7b0-64f3-41ac-8d0d-dbf96fde256e", "e0051e42-5939-4c45-b2a6-12dd24d9b914",
    ]
    RETURN thing
Query: AQL: Error message received from cluster node 'PRMR-wtnfivh5': Expecting Array slice [node #55: IndexNode] (exception location: /work/ArangoDB/arangod/Aql/ExecutionBlockImpl.tpp:505). Please report this error to arangodb.com (exception location: /work/ArangoDB/arangod/Aql/RemoteExecutor.cpp:225). Please report this error to arangodb.com (while executing) (exception location: /work/ArangoDB/arangod/RestHandler/RestCursorHandler.cpp:279). Please report this error to arangodb.com

The index:

ID TYPE UNIQUE SPARSE EXTRAS SELECTIVITY EST. FIELDS STORED VALUES NAME
89219539 persistent <true, but not displayed because of another 3.11 bug> false deduplicate: false, estimates: true, cacheEnabled: false 100.00% uuid uuid

Changing sparse or the other index settings has no impact on the error.

However, shortening the 6th UUID one character at a time eventually allows the query to succeed, though obviously without the 6th referenced vertex:

FOR thing IN things
    FILTER thing.uuid IN [
        "1be85c49-cbb7-4dda-a16b-fe7593ad0f71", "b3aeaa7d-e293-4624-8605-0e95b9fbaea2",
        "6528c047-df79-4cf6-a411-f17030cfabc9", "1db8b8da-17d4-4375-b37d-8114662fa91c",
        "88fdc7b0-64f3-41ac-8d0d-dbf96fde256e", "e0051e42-593",
    ]
    RETURN thing

However, if the unique index uses the compound form uuid,florkle where florkle can be any existing or non-existing field, the error no longer occurs and the index is still utilized.

Another interesting observation is that this occurs both in the OP's single server config, and our ArangoCloud OneShard instance.

IIRC, there was some work done recently in ArangoDB to remove the old "unique indexes must include '_key:'" requirement, but perhaps the changes are... incomplete.

@dothebart
Copy link
Contributor

Hi, this issue has been fixed #19153 in 3.11.1; Please upgrade to get the fixed version.

@dothebart dothebart added 1 Bug 3 AQL Query language related 2 Fixed Resolution 3 Index labels Jul 6, 2023
@nashikb
Copy link
nashikb commented Jul 6, 2023

Thanks. Unfortunately 3.11.1 is still not available on the ArangoGraph cloud instances. :-(

@mattcarabine
Copy link

Hey @nashikb, I notice that you've got a support contract with us.

If you contact our support team via the "Request Help" button in the ArangoGraph UI, we should be able to get these deployments upgraded.

@nashikb
Copy link
nashikb commented Jul 6, 2023

Hey @nashikb, I notice that you've got a support contract with us.

If you contact our support team via the "Request Help" button in the ArangoGraph UI, we should be able to get these deployments upgraded.

Yep, thanks, was already in contact but it was after-hours. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Bug 2 Fixed Resolution 3 AQL Query language related 3 Index
Projects
None yet
Development

No branches or pull requests

4 participants
0