neo4j / graph-data-science

Source code for the Neo4j Graph Data Science library of graph algorithms.
https://neo4j.com/docs/graph-data-science/current/
Other
596 stars 157 forks source link

GDS triangleCount, there is a bug when configuring `nodeLabels` #259

Closed sybest1259 closed 1 year ago

sybest1259 commented 1 year ago

GDS version: 2.3 Neo4j version: 5.3.0 Operating system: Ubuntu 18.04

Steps to reproduce the behavior: I ran the triangleCount algo as follow: CALL gds.triangleCount.stream( 'g2', { maxDegree: 10, nodeLabels: ['person'] } ) YIELD nodeId, triangleCount RETURN gds.util.asNode(nodeId).name AS name, triangleCount ORDER BY triangleCount DESC

Then I got an error: Failed to invoke procedure gds.triangleCount.stream: Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 16722829 out of bounds for length 15560 I found that 16722829 is an id of node Is there any bugs in traingleCount algo?

FlorentinD commented 1 year ago

This is definitely a bug in the algorithm. The user should never see a AIOOB exception.

Thanks for reporting. Would you be able to provide your dataset as well?

FlorentinD commented 1 year ago

If not, providing the stacktrace from the logs would be also helpful.

sybest1259 commented 1 year ago

Thks @FlorentinD, I'm sorry,the dataset is of privacy,I ran traingleCount algo on the web side as follow: 截屏2023-03-24 08 22 29 docker logs: 截屏2023-03-24 08 32 28

vnickolov commented 1 year ago

@sybest1259 would it be possible to share the debug.log and neo4j.log from the Neo4j logs directory, they should contain more details about the error.

FlorentinD commented 1 year ago

Also would it be possible to give us the graph projection query?

vnickolov commented 1 year ago

Closing this since we can't reproduce it and it has been inactive for more than a month.