Closed Things-Z closed 2 years ago
After I look at the source code, the code I had a problem with should look like the following, assert index < size
This assertion compares index
with size
of array
However, the received index is nodeId
So when I have a very large nodeId, greater than the array.size
of nodes created by graph.project
, throw an exception
So what do we need to fix if this happens? This seems to be about all sourceNodes
bug, other algorithms that need to pass in sourceNodes parameters might have this problem as well
😅😅😅
I tried to build the debugger from source code, but the JAR I built myself didn't work
If you can solve this problem, thank you very much
I tried to build the debugger from source code, but the JAR I built myself didn't work
![]()
If you can solve this problem, thank you very much
I changed settings.gradlew
to replace 4.3
with 4.4
and now it's compiled and ready to run.
But about ArrayIndexOutOfBoundsException
problem, I haven't think of a solution
Hej @RGDZ-GZU, thank you for submitting the issue. You where indeed correct that the node IDs configured as sourceNodeIds
where not mapped into the internal id space.
I have created a fix that should be merged within the coming days.
The fix should be available in the 2.0.1 patch release.
Best, Max
I made a simple improvement to ListNodeSupplier
, using graph.tomappedNodeId
to convert to an internally mapped ID
when returning nextNode
, and it now works fine
This may be a feasible and simple temporary solution
Yes that is basically the fix that I developed. :)
Getting the same issue when running this:
MATCH (source:Person {userId: 'k6_auth_4'}), (target:Person{userId: 'k6_auth_5'} ) CALL gds.shortestPath.dijkstra.stream('myGraph', { sourceNode: id(source), targetNode: id(target), relationshipTypes: ['FRIENDS'], nodeLabels: ['Person'], logProgress: true }) YIELD index, sourceNode, targetNode, totalCost, nodeIds, costs, path RETURN totalCost
On some selected nodes it is working though
Neo4jError: Failed to invoke procedure gds.shortestPath.dijkstra.stream: Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 4
@andrew-delph this is unrelated to randomWalk
can you please create a separate issue and share more details about the case when this is failing, like dataset, graph project queries. Thank you in advance.
Describe the bug
GDS is a great project and has been clicked on star, but when running randomWalk, the program timed out.
I think the main problem is when I rebuild the graph again after deleting the last graph The node ID generated by neo4j was extremely large for me, but the total number of nodes was very small. As a result, when I specified sourceNodes in randomWalk, the id(node) passed in would be extremely large, exceeding the number of nodes, resulting in the abnormal operation of randomWalk
cypher-command:
Error log:
To Reproduce
GDS version: 2.0.0 Neo4j version: 4.4.4 Operating system: MacOS-Monterey-12.3(Inter)
Steps to reproduce the behavior:
Expected behavior
Ids and PATH should be returned normally
Additional context