Skip to content

Commit c07b322

Browse files
committed
Off by one error in searcher
1 parent c2fae1e commit c07b322

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/aql/aqlquery.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package aql
22

33
import (
44
"errors"
5-
"runtime"
65
"sync"
76

87
deque "github.com/edwingeng/deque/v2"
@@ -75,7 +74,7 @@ func (aqlq AQLquery) Resolve(opts ResolverOptions) (*graph.Graph[*engine.Node, e
7574
return true
7675
}
7776
return false
78-
}, runtime.NumCPU())
77+
}, 0)
7978
return &result, nil
8079
}
8180

@@ -338,7 +337,7 @@ func (aqlq AQLquery) resolveEdgesFrom(
338337
// }
339338

340339
// Next node is a match
341-
if currentState.currentDepth >= thisEdgeSearcher.MinIterations &&
340+
if nextDepth >= thisEdgeSearcher.MinIterations &&
342341
(nextTargets == nil || nextTargets.Contains(nextObject)) {
343342
newWorkingGraph := currentState.workingGraph.Clone()
344343
newWorkingGraph.Add(nextObject, direction, byte(currentState.currentSearchIndex+1))

0 commit comments

Comments
 (0)