Skip to content
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

[Bug] AQL inbound graph query v is path.vertices[0] instead of path.vertices[1] #16589

Open
baslr opened this issue Jul 22, 2022 · 5 comments
Open
Labels
3 AQL Query language related 3 Graph Graph query engine
Milestone

Comments

@baslr
Copy link
Contributor

baslr commented Jul 22, 2022

My Environment

  • ArangoDB Version: 3.10 heads/devel-0-g9715ebd541e 9715ebd
  • Deployment Mode: Single Server
  • Deployment Strategy: Manual Start
  • Configuration: default
  • Infrastructure: aws linux vm
  • Operating System: 5.15.0-1013-azure Ubuntu 22.04
  • Total RAM in your machine: 16 GB
  • Disks in use: SSD

Component, Query & Data

Affected feature: AQL graph query

AQL query (if applicable):

// run this query and alternate commenting out one of the let str
// with let str = 'abc' the query will assert
LET doc = (FOR d IN test_2
    FILTER d.token == 'asdf'
    RETURN d)[0]
FILTER ASSERT(doc != NULL, 'doc not found')

LET doc1 = (FOR v,e IN INBOUND doc test_12test_2
//    let str = v._id + ' ' + e._from + ' ' + e._to
        let str = 'abc'
    FILTER ASSERT(v.val == 'helloo', concat('helloo not found ', str))
RETURN v)[0]

return doc1

Dataset:

// setup
INSERT {
    val: 'helloo'
    } INTO test_1
LET newT1 = NEW

INSERT {
    token:'asdf' } INTO test_2
LET newT2 = NEW

INSERT {
_from: newT1._id,
_to: newT2._id } INTO test_12test_2

Steps to reproduce

  1. create collections and run insert query
  2. execute query and comment out one of the let str

Problem:
Without accessing v, v is not the test_1 document but the test_2 document. You can verify that by
asserting out v._id.

Expected result:
v is the inbound collection.

Build via cmake ...

/build/bin/arangod --version
3.10.0-devel

architecture: 64bit
arm: false
asan: false
asm-crc32: true
assertions: false
avx: true
avx2: true
boost-version: 1.78.0
build-date: 2022-07-21 15:20:51
build-repository: heads/devel-0-g9715ebd541e
compiler: gcc [11.2.0]
cplusplus: 202002
curl-version: none
debug: false
endianness: little
failure-tests: false
fd-client-event-handler: poll
fd-setsize: 1024
full-version-string: ArangoDB 3.10.0-devel [linux] 64bit, using jemalloc, build heads/devel-0-g9715ebd541e, VPack 0.1.36, RocksDB 7.2.0, ICU 64.2, V8 7.9.317, OpenSSL 3.0.2 15 Mar 2022
icu-version: 64.2
ipo: false
iresearch-version: 1.2.0.0
jemalloc: true
libunwind: true
license: community
maintainer-mode: false
memory-profiler: false
ndebug: true
openssl-version-compile-time: OpenSSL 3.0.2 15 Mar 2022
openssl-version-run-time: OpenSSL 3.0.2 15 Mar 2022
optimization-flags: -march=skylake-avx512 -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mfma -mbmi2 -mavx2 -mavx512f -mavx512vl -mavx512cd -mavx512dq -mavx512bw -mno-sse4a -mno-xop -mno-fma4 -mno-avx512pf -mno-avx512er -mno-avx512ifma -mno-avx512vbmi
pic: 2
pie: 2
platform: linux
reactor-type: epoll
replication2-enabled: true
rocksdb-version: 7.2.0
server-version: 3.10.0-devel
sizeof int: 4
sizeof long: 8
sizeof void*: 8
sse42: true
tsan: false
unaligned-access: true
v8-version: 7.9.317
vpack-version: 0.1.36
zlib-version: 1.2.12

The problem also exists at e2065fe

// with accessing v the query works
Screenshot 2022-07-22 012203
// without accessing v, v is path.vertices[0]
Screenshot 2022-07-22 014845

@dothebart dothebart added 3 AQL Query language related 3 Graph Graph query engine labels Jul 22, 2022
@baslr
Copy link
Contributor Author

baslr commented Jul 25, 2022

bf44062 still throws the error.

@baslr
Copy link
Contributor Author

baslr commented Jul 28, 2022

537e7de still throws the error.

@baslr
Copy link
Contributor Author

baslr commented Jul 30, 2022

a8ded6a still throws the error.

@mchacki
Copy link
Member

mchacki commented Aug 15, 2022

This PR is going to fix the issue.
#16622

@mchacki
Copy link
Member

mchacki commented Aug 15, 2022

Thank you for reporting this 👍

@Simran-B Simran-B added this to the 3.11 milestone Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 AQL Query language related 3 Graph Graph query engine
Projects
None yet
Development

No branches or pull requests

4 participants