You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered a bug that RedisGraph could not deal with correct path traversal results.
RedisGraph version: 2.10.4
Operating system: macOS 13.2.1
API/Driver: Java
Expected behavior:
We construct the following scenario: x equals to count (nodeA -> nodeB) path numbers, y equals to count (nodeB -> nodeC) path numbers, z equals to count(nodeA -> nodeB -> nodeC) path numbers, where the path starts from nodeA, passes nodeB, finally reaches nodeC. Then z should equal to x*y.
We generate graph schema and data based on random strings and values. Here is one of our examples that triggered the bug.
MATCH path=(a)-[*]-(b) WHERE ID(a)=0 AND ID(b)=2 RETURN COUNT(path) returns 0
MATCH path=(a)-[*]-(b) WHERE ID(a)=2 AND ID(b)=3 RETURN COUNT(path) returns 3
MATCH path=(a)-[*]-(b)-[*]-(c) WHERE ID(a)=0 AND ID(b)=2 AND ID(c)=3 RETURN COUNT(path) returns 3 != 0 * 3
Actual behavior:
The query 3 returns 3 != 0 * 3
Steps to reproduce:
Our graph data is randomly generated by calling the CRUD API. Although the randomness of the graph data generation process, we still find the problem after many attempts. Reproduce: Generate a graph -> Get all node ids -> Count the number of paths for any two ids -> Multiply and compare following our strategy.
We feel sorry that because the database schema and data values are randomly generated by strings, it will cause inconvenience to your reviewing. but we believe the problem does exist.
Following the following graph data generation query, we can reproduce the bugs:
I discovered a bug that RedisGraph could not deal with correct path traversal results.
Expected behavior:
We construct the following scenario: x equals to count (nodeA -> nodeB) path numbers, y equals to count (nodeB -> nodeC) path numbers, z equals to count(nodeA -> nodeB -> nodeC) path numbers, where the path starts from nodeA, passes nodeB, finally reaches nodeC. Then z should equal to x*y.
We generate graph schema and data based on random strings and values. Here is one of our examples that triggered the bug.
MATCH path=(a)-[*]-(b) WHERE ID(a)=0 AND ID(b)=2 RETURN COUNT(path)
returns 0MATCH path=(a)-[*]-(b) WHERE ID(a)=2 AND ID(b)=3 RETURN COUNT(path)
returns 3MATCH path=(a)-[*]-(b)-[*]-(c) WHERE ID(a)=0 AND ID(b)=2 AND ID(c)=3 RETURN COUNT(path)
returns 3 != 0 * 3Actual behavior:
The query 3 returns 3 != 0 * 3
Steps to reproduce:
Our graph data is randomly generated by calling the CRUD API. Although the randomness of the graph data generation process, we still find the problem after many attempts. Reproduce: Generate a graph -> Get all node ids -> Count the number of paths for any two ids -> Multiply and compare following our strategy.
We feel sorry that because the database schema and data values are randomly generated by strings, it will cause inconvenience to your reviewing. but we believe the problem does exist.
Following the following graph data generation query, we can reproduce the bugs:
The text was updated successfully, but these errors were encountered: