incubator-hugegraph: Hugegraph could not deal with correct path traversal results
Bug Type (问题类型)
gremlin (结果不合预期)
Before submit
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.g.V(675011034469105664).repeat(out().simplePath()).until(hasId(675011035228274688)).path().size()return 9g.V(675011035228274688).repeat(out().simplePath()).until(hasId(675011034720763904)).path().size()return 10g.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
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 15 (9 by maintainers)
OK, thanks! Here’s the more information to reproduce. Every running we create a graph with 100 vertexes, 200 edges, 20 vertex labels, and 20 edge labels.
g.V(676416096676347904).repeat(out().simplePath()).until(hasId(676416097599094784)).path().size()return 3g.V(676416097599094784).repeat(out().simplePath()).until(hasId(676416097045446656)).path().size()return 16g.V(676416096676347904).repeat(out().simplePath()).until(hasId(676416097599094784)).repeat(out().simplePath()).until(hasId(676416097045446656)).path().size()return 9. Query 3 should have returned 3*16.Each time the schema and data are randomly generated. In every random graph, there’re more result inconsistency than the example I presented above.