apache / apache/hugegraph

Hugegraph could not deal with correct path traversal results

Open
#2,067 15 comments 0 reactions 1 assignee Claimed by @javeme View on GitHub
bug gremlin
Dominant language
Java
Stars
3.2k
Forks
636
Avg merge
3d 11h
Merged PRs (30d)
14

Description

### Bug Type (问题类型)

gremlin (结果不合预期)

### Before submit

- [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题

### Environment (环境信息)

- Server Version: v0.12.0
- Backend: memory
- OS: 2.6 GHz 6-Core Intel Core i7, 32 GB, macOS 13.1
- Data Size: 100 vertices, 100 edges

### Expected & Actual behavior (期望与实际表现)

- Expected & Actual behavior
We construct the following scenario: x equals count nodes(A->B) path numbers, y equals count nodes(B->C) path numbers, z equals count(A->B->C) path numbers. Then z should equal to x*y.
We generate graph schema and data based on random strings and values. We build the graph with 100 vertexes, 200 edges, 20 vertex labels, and 20 edge labels.
`g.V().id()` is used to get the node ids of the graph, then can use for loop to traverse all the nodes. Here is one of our examples executed.
1) `g.V(675011034469105664).repeat(out().simplePath()).until(hasId(675011035228274688)).path().size()` return 9
2) `g.V(675011035228274688).repeat(out().simplePath()).until(hasId(675011034720763904)).path().size()` return 10
3) `g.V(675011034469105664).repeat(out().simplePath()).until(hasId(675011035228274688)).repeat(out().simplePath()).until(hasId(675011034720763904)).path().size()` return 0. Query 3 should have returned 9*10.
- Steps to Reproduce:
Although the randomness of the graph data generation process, we still find the problem after many attempts. Reproduce: Generate a large enough graph -> Get all node ids -> Count the number of paths for any two ids -> Multiply and compare following our strategy. The reason for this bug we think is that HugeGraph doesn't support two-hop path number traversal?

### Vertex/Edge example (问题点 / 边数据举例)

_No response_

### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.